I worked on streaming live audio using the Audio Streaming Services library (based on the Matt Ghallager tutorial ), and I continued to crash on this part:
err = AudioQueueStart(audioQueue, NULL);
if (err)
{
[self failWithErrorCode:AS_AUDIO_QUEUE_START_FAILED];
return;
}
error code: kAudioDeviceUnsupportedFormatError .. this guy is defined in CoreAudio / AudioHardware.h, which seems to be hardware related, I could not find much useful information about this error on the Internet.
The interesting part is that I used to encounter a similar problem when trying this:
err = AudioQueueNewOutput(&asbd, MyAudioQueueOutputCallback, self, NULL, NULL, 0, &
if (err)
{
[self failWithErrorCode:AS_AUDIO_QUEUE_CREATION_FAILED];
return;
}
(the same problem was encountered in this , but the author of the message mistakenly attributed his error code AudioQueueStart, not AudioQueueNewOutput)
: kAudioFormatUnsupportedDataFormatError.. :
asbd.mFormatID = kAudioFormatMPEGLayer3;
,
AudioFileStreamGetProperty(inAudioFileStream, kAudioFileStreamProperty_DataFormat, &asbdSize, &asbd);
kAudioFormatMPEGLayer1 mFormatID, kAudioFormatMPEGLayer3, .mp3, , .
.. , , , - , , :
AudioFileStreamOpen((__bridge void*)streamer, ASPropertyListenerProc, ASPacketsProc,
0, &(streamer->audioFileStream));
, inFileTypeHint