• 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
Re: Efficient functions to convert 24 bit WAV audio into Float32
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Efficient functions to convert 24 bit WAV audio into Float32
      • From: William Stewart <email@hidden>
References: 
 >Efficient functions to convert 24 bit WAV audio into Float32 (From: Mark Gilbert <email@hidden>)

  • Prev by Date: Re: Simple Cocoa record
  • Next by Date: Re: Efficient functions to convert 24 bit WAV audio into Float32
  • Previous by thread: Efficient functions to convert 24 bit WAV audio into Float32
  • Next by thread: Re: Efficient functions to convert 24 bit WAV audio into Float32
  • Index(es):
    • Date
    • Thread