• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Converting from INT to Float samples
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting from INT to Float samples


  • Subject: Converting from INT to Float samples
  • From: email@hidden
  • Date: Fri, 22 Jun 2001 13:36:40 -0700

Woops, I sent this to the wrong address!!

James
----- Forwarded by James W Wihardja/USA/Conexant on 06/22/01 01:36 PM -----

James W
Wihardja To: email@hidden
cc:
06/21/01 Subject: Converting from INT to Float samples
04:39 PM





Hi guys,

Ok, so now I have my AudioUnit playing properly. However, I'm having
trouble with the conversion of Sint to float.

I am trying to "Record" some data from an AudioDevice -- Which ends up in
an SINT16 formatted array. If I play back this array using AudioDevice
everything sounds OK.

BUT, if I try to feed this out to the AudioUnit, it sounds quite bad. I
assume this is because AudioUnit requires float samples over Sint. I'm not
exactly sure how to do this. I tried to copy an Int-to-float routine from
a sample driver:

if (integer >=0 {
floatSample = integer / 32767.0;
} else {
floatSample = integer / 32768.0;
}

However, this sounds bad too. Any ideas?

Thanks,
James


  • Follow-Ups:
    • Re: Converting from INT to Float samples
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: real device list
  • Next by Date: Re: Converting from INT to Float samples
  • Previous by thread: Re: real device list
  • Next by thread: Re: Converting from INT to Float samples
  • Index(es):
    • Date
    • Thread