• 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: Decoding compressed to LPCM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decoding compressed to LPCM


  • Subject: Re: Decoding compressed to LPCM
  • From: Stephen Davis <email@hidden>
  • Date: Mon, 21 Apr 2008 10:14:43 -0700

On Apr 21, 2008, at 10:01 AM, Stephen Davis wrote:

Your comment says you're setting the audio format to 44.1kHz, stereo, 16-bit native-endian integer but you're actually setting it to 44.1kHz, stereo, 32-bit native-endian floating point. I'd surmise that might be the issue. :-)

Off the top of my head, I think you just need to change these lines:

clientFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
clientFormat.mBitsPerChannel = 8 * sizeof(short);


Note that this is setting the data to little-endian which is required for the WAV format.

The format you were using should've worked since .WAV supports 32- bit floating point files but it may have been failing for one or both of the following two reasons:

1) You're on a powerpc machine and the kAudioFormatFlagIsPacked specifies native-endian.

Oops, I meant kAudioFormatFlagsCanonical specifies native-endian.

stephen
_______________________________________________
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


References: 
 >Decoding compressed to LPCM (From: AurĂ©lien Ammeloot <email@hidden>)
 >Re: Decoding compressed to LPCM (From: Jens Alfke <email@hidden>)
 >Re: Decoding compressed to LPCM (From: AurĂ©lien Ammeloot <email@hidden>)
 >Re: Decoding compressed to LPCM (From: Stephen Davis <email@hidden>)

  • Prev by Date: Re: AUMatrixMixer questions
  • Next by Date: Re: Decoding compressed to LPCM
  • Previous by thread: Re: Decoding compressed to LPCM
  • Next by thread: Re: Decoding compressed to LPCM
  • Index(es):
    • Date
    • Thread