我正在使用 EZAudio 框架(https://github.com/syedhali/EZAudio),并且在尝试使用自定义 AudioStreamBasicDescription 初始化我的输出时...
- (void)openMediaPlayer {
// Initialize the EZOutput instance and assign it a delegate to provide the output audio data
AudioStreamBasicDescription audioDesc;
audioDesc.mFormatID = kAudioFormatLinearPCM;
audioDesc.mSampleRate = 44100;
audioDesc.mChannelsPerFrame = 2;
audioDesc.mBytesPerFrame = 4;
audioDesc.mFramesPerPacket = 1;
audioDesc.mBytesPerPacket = 4;
audioDesc.mBitsPerChannel = 16;
audioDesc.mReserved = 0;
self.output = [EZOutput outputWithDataSource:self withAudioStreamBasicDescription:audioDesc];
self.currentAudioPieceIndex = 0;
}
我收到错误“错误:无法初始化输出单元('fmt?')”
这是什么意思?AudioDesc 设置为 PCM 16 位立体声音频的合理默认值。
更新:当我使用调试器时,我发现我得到了 OSStatus 1718449215。