Question

I'm try to record some audio to mp3 based on Apple's AudioQueueTool example program; however, when I attempt to create Audio Queue using AudioQueueNewInput I get back the error 1718449215 which according to Apple's documentation means that "The playback data format is unsupported" My AudioStreamBasicDescription is set like this

AudioStreamBasicDescription output_format;
memset(&output_format, 0, sizeof(output_format));
output_format.mSampleRate=44100.0;
output_format.mChannelsPerFrame = 1;
output_format.mFormatID = kAudioFormatMPEGLayer3;
output_format.mBitsPerChannel = 16;
output_format.mBytesPerPacket = output_format.mBytesPerFrame =
(output_format.mBitsPerChannel / 8) * output_format.mChannelsPerFrame;
output_format.mFramesPerPacket = 1;
output_format.mReserved = 0;

I have looked at other simular questions for IOS where the answer was that IOS's version of Core Audio does not support recording mp3's is this the case with the Mac as well? Any help would be greatly appreciated.

Was it helpful?

Solution

Neither Core Audio on OS X nor iOS support recording to MP3.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top