Re: Efficient functions to convert 24 bit WAV audio into Float32
Re: Efficient functions to convert 24 bit WAV audio into Float32
- Subject: Re: Efficient functions to convert 24 bit WAV audio into Float32
- From: Steve Checkoway <email@hidden>
- Date: Sat, 22 Oct 2005 12:30:46 -0700
On Oct 22, 2005, at 6:06 AM, Mark Gilbert wrote:
Folks.
We are optimizing our code, and we have got to a part of our
playback engine where we are feeding 24 bit Intel Format data into
an output device (requiring Float32).
Right now we have a function call which operates on each 24-bit
word. Clearly this is not efficient.
We have conjured up a macro for 16 bit to Float32, but its proving
tricky for 24 bit to Float32 (supporting both Moto and intel byte
ordering). Also, the macro is using some floating point division
which is apparently not efficient.
Is there some excellent function built into Core audio for these
conversions ?
We've been using AudioConverterConvertBuffer() for our audio
conversion needs. I'm not sure if it will convert from 24 bit (I can
only assume you mean little endian here) to float, however it looks
like you could clear the following flags: kAudioFormatFlagIsFloat,
kAudioFormatFlagIsBigEndian,
kAudioFormatFlagIsPacked, and kAudioFormatFlagIsAlignedHigh. Then, if
you specified 24 bits per channel, it looks like that should be enough.
- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden