iOS播放mp2流,AudioQueueNewOutput失败

鸣泽晨 发布于 2016/02/23 12:49
阅读 806
收藏 0
用AudioQueue播放MP2的音频流,在OS X上正常,iOS上AudioQueueNewOutput失败:AudioConverterNew from AudioQueueNew returned 'fmt?'
io:     2 ch,  44100 Hz, Float32, non-inter
client:    2 ch,  44100 Hz, '.mp2' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame

-------------------------------------

AudioStreamBasicDescription的值是通过AudioFileStreamGetProperty/kAudioFileStreamProperty_DataFormat取到的
(mSampleRate=44100,
mFormatID=778924082[kAudioFormatMPEGLayer2],
mFormatFlags=0,
mBytesPerPacket=0,
mFramesPerPacket=1152,
mBytesPerFrame=0,
mChannelsPerFrame=2,
mBitsPerChannel=0,
mReserved=0)。

AudioStreamBasicDescription里各项参数有什么关系,请教这里的值要怎么配置,才能播放mp2音频流?


加载中
返回顶部
顶部