Re: New Sample: ExtAudioFile/Recording
Re: New Sample: ExtAudioFile/Recording
- Subject: Re: New Sample: ExtAudioFile/Recording
- From: "tahome izwah" <email@hidden>
- Date: Sat, 22 Jul 2006 12:32:34 +0200
Hi Doug,
please s.b.
2006/7/21, Doug Wyatt <email@hidden>:
On Jul 20, 2006, at 22:43 , tahome izwah wrote:
> [Session started at 2006-07-21 07:28:53 +0200.]
> ExtAudioFileCreateNew FAILED! 1718449215 'fmt?'
> Recording stoped.
>
> I'm certain that I am missing something related to the corresponding
> AudioStreamBasicDescription but I don't know where to look, can you
> help?
The data format you're supplying for the file is incompatible with
the file format. For WAVE you probably want a little-endian 8, 16,
or 24-bit linear PCM format.
I tried to set this in order to write out an AIFF file but it still
doesn't work. If I fill in the AudioStreamBasicDescription as follows
theFormat.mChannelsPerFrame = 2;
theFormat.mSampleRate = 44100.0;
theFormat.mFormatID = kAudioFormatLinearPCM;
theFormat.mFormatFlags = kLinearPCMFormatFlagsAreAllClear |
kAudioFormatFlagIsPacked | kAudioFormatFlagIsBigEndian;
theFormat.mBitsPerChannel = sizeof(short int) * 8;
theFormat.mBytesPerFrame = theFormat.mChannelsPerFrame *
theFormat.mBitsPerChannel / 8;
theFormat.mFramesPerPacket = 1;
theFormat.mBytesPerPacket = theFormat.mBytesPerFrame *
theFormat.mFramesPerPacket;
then the call to ExtAudioFileCreateNew succeeds but then
ExtAudioFileSetProperty in DCAudioFileRecorder::ConfigureOutputFile
fails. I am using the code without change, except for trying AIFF
instead of MP4 AAC.
I don't get it... how do I have to fill in the
AudioStreamBasicDescription to write a 16bit integer AIFF file, 2
channels @ 44.1kHz?? Could you let us know what I have to change to
write AIFF instead of MP4?
See my earlier message today for examples of how to determine the
compatible data formats for a given file format.
I will but that's a lot of stuff to take in... more than I really
wanted to know ;-)
I was previously using Stefan Bernsee's miniAIFF library
(http://www.dspdimension.com) for reading/writing audio files which is
great and works like a charm, but I'd like to support more audio
formats than just AIFF.
Thanks again
--tahome
_______________________________________________
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