AURemoteIO :: IOThread(18):EXE_BAD_ACCESS(Code1,地址0X20)

时间:2017-05-26 07:09:02

标签: ios audio-streaming objective-c++

我正在使用以下功能来渲染传入的音频。

static OSStatus audioUnitRenderCallback(void                       *inRefCon,
                                    AudioUnitRenderActionFlags *ioActionFlags,
                                    const AudioTimeStamp       *inTimeStamp,
                                    UInt32                      inBusNumber,
                                    UInt32                      inNumberOfFrames,
                                    AudioBufferList            *ioData{
     // App is crashing at this : 
AudioUnitIO *SELF = (__bridge AudioUnitIO *)inRefCon;

// MICROPHONE: take the sound received, render it into bytes and hand them to the delegate
AudioUnitRender(SELF->g_audioUnit,
                ioActionFlags,
                inTimeStamp,
                g_inputBus,
                inNumberOfFrames,
                ioData);

if (!SELF->recordingAudio) {
    memset(ioData->mBuffers[0].mData, 0, ioData->mBuffers[0].mDataByteSize);        
// Some other code goes here

}

如上所述,我正在接受崩溃。我错过了什么吗?

0 个答案:

没有答案