• 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: What is the AudioStreamBasicDescription(asbd) for a wav file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the AudioStreamBasicDescription(asbd) for a wav file


  • Subject: Re: What is the AudioStreamBasicDescription(asbd) for a wav file
  • From: Chris Adamson <email@hidden>
  • Date: Thu, 8 Jul 2010 19:09:37 -0400

PCM in a WAV can't be big-endian, for starters. 

Our upcoming Core Audio book has an example that uses AudioFileGetGlobalInfo to inspect the supported audio formats for various file types. Here's what works in a WAV

0: mFormatId: lpcm, mFormatFlags: 8, mBitsPerChannel: 8
1: mFormatId: lpcm, mFormatFlags: 12, mBitsPerChannel: 16
2: mFormatId: lpcm, mFormatFlags: 12, mBitsPerChannel: 24
3: mFormatId: lpcm, mFormatFlags: 12, mBitsPerChannel: 32
4: mFormatId: lpcm, mFormatFlags: 9, mBitsPerChannel: 32
5: mFormatId: lpcm, mFormatFlags: 9, mBitsPerChannel: 64

-Chris

Sent from my iPad

On Jul 8, 2010, at 4:02 PM, Sanoj Nambi <email@hidden> wrote:

Hey,

I am writing the sound data from the mixer to a file of caf file
here is the asbd for caf

        anASBD.mFormatID = kAudioFormatLinearPCM;

anASBD.mFormatFlags = kAudioFormatFlagIsSignedInteger |

                      kAudioFormatFlagIsBigEndian | kAudioFormatFlagIsPacked;

anASBD.mSampleRate = 44100;

anASBD.mChannelsPerFrame = 2;

anASBD.mFramesPerPacket = 1;

anASBD.mBytesPerPacket=anASBD.mChannelsPerFrame * sizeof (SInt16);

anASBD.mBytesPerFrame =anASBD.mChannelsPerFrame * sizeof (SInt16);

anASBD.mBitsPerChannel = 16;


this part is working fine.But Now I need to write to a 'wav' file instead for caf.

I tried all possible combination but failed every time.

Can anyone help me with the correct asbd for WAV file.


Thank you


Regards,

Nambiar


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: 
 >What is the AudioStreamBasicDescription(asbd) for a wav file (From: Sanoj Nambi <email@hidden>)

  • Prev by Date: What is the AudioStreamBasicDescription(asbd) for a wav file
  • Next by Date: iPhone Library Access
  • Previous by thread: What is the AudioStreamBasicDescription(asbd) for a wav file
  • Next by thread: Re: What is the AudioStreamBasicDescription(asbd) for a wav file
  • Index(es):
    • Date
    • Thread