Re: Attempting to create a audio file I get error -50
Re: Attempting to create a audio file I get error -50
- Subject: Re: Attempting to create a audio file I get error -50
- From: tahome izwah <email@hidden>
- Date: Sat, 20 Nov 2010 19:12:54 +0100
bd.mFormatID ='.mp3';
kAudioFileMP3Type
This is not supported. MacOS X doesn't have a built-in MP3 encoder
that is available to 3rd party developers. I assume this is due to
licensing restrictions. You need to install and use an external MP3
encoder such as LAME if you want to create MP3 files, or use AAC
instead.
HTH
--th
2010/11/20 Development <email@hidden>:
> I'm attempting to create a new audio file.
> I am using the following code:
> ExtAudioFileRef recFile;
> self.recordFile = recFile;
> bd.mFormatID ='.mp3';
> bd.mChannelsPerFrame = 2;
> bd.mBytesPerPacket = 2 * bd.mChannelsPerFrame;
> bd.mFramesPerPacket = 1;
> bd.mBitsPerChannel =8.24;
> bd.mBytesPerFrame = ( bd.mBitsPerChannel / 8.24 ) * bd.mChannelsPerFrame;
>
> OSStatus result = ExtAudioFileCreateWithURL((CFURLRef)soundFileURL,
> kAudioFileMP3Type, &bd,
> NULL, kAudioFileFlags_EraseFile, &recFile);
> NSLog(@"Result of Create File %i",result);
>
> The result I always get is -50
> Which param am I passing incorrectly?
>
_______________________________________________
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