Converting from INT to Float samples
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