|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
I think you should be using SInt16 rather than
AudioUnitSampleType. Also, although it doesn't matter if you only ever run
on Intel, omit kAudioFormatFlagsNativeEndian.
Little-endian is the default and that's what you want here.
Something to get your head around if you are using
Extended Audio File Services is that there are two data formats you need to
specify. One is the format of the file you want to create, and that (I
assume) is what we're discussing here. The other is the 'client
data format' which specifies the format of samples you pass to
ExtAudioFileWrite. This, within reason, can be anything you like.
They can of course be the same, and from you're previous post that's probably
what you want, but the nice thing is that they don't have to be.
HTH.
Regards,
Paul Sanders.
----- Original Message -----
From: Sanoj Nambi
To: Paul Sanders
Cc: tahome izwah ; email@hidden
Sent: Friday, July 09, 2010 9:16 PM
Subject: Re: What is the AudioStreamBasicDescription(asbd) for a wav
file anASBD.mSampleRate = 44100.0; anASBD.mFormatID = kAudioFormatLinearPCM; anASBD.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical; anASBD.mBytesPerPacket = sizeof(AudioUnitSampleType)*2; anASBD.mFramesPerPacket = 1; anASBD.mBytesPerFrame = sizeof(AudioUnitSampleType)*2; anASBD.mChannelsPerFrame = 2; anASBD.mBitsPerChannel = 8 * sizeof(AudioUnitSampleType); anASBD.mReserved = 0; anASBD.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked; and it is creating a wav file.I can also see the size of the file is 5 MB.But I am unable to play. I dont want to use some other framework unless i have no other option. 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>) | |
| >Re: What is the AudioStreamBasicDescription(asbd) for a wav file (From: "Paul Sanders" <email@hidden>) | |
| >Re: What is the AudioStreamBasicDescription(asbd) for a wav file (From: tahome izwah <email@hidden>) | |
| >Re: What is the AudioStreamBasicDescription(asbd) for a wav file (From: "Paul Sanders" <email@hidden>) | |
| >Re: What is the AudioStreamBasicDescription(asbd) for a wav file (From: Sanoj Nambi <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.