我正在使用AudioGraph。mvn gwt:debug
是一个回调函数。
eqRenderInput
static OSStatus eqRenderInput(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData)
{
@autoreleasepool {
NSLog(@"--method = %s--current thread:%@",__func__,[NSThread currentThread]);
MyAudioController *mycon = (__bridge MyAudioController *)inRefCon;
AudioUnit mixUNIT = mycon->mixUnit;
AudioUnitRender(mixUNIT, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData);
int bufferCount = ioData->mNumberBuffers;
NSLog(@"current thread:%@----bufferCount=%d",[NSThread currentThread],bufferCount);
// Fill the provided AudioBufferList with the data from the AudioBufferList output by the audio data output
for (int bufferIndex = 0; bufferIndex < bufferCount; bufferIndex++) {
NSData *tmpData = [NSData dataWithBytes:ioData->mBuffers[bufferIndex].mData length:ioData->mBuffers[bufferIndex].mDataByteSize];
[mycon->mixMArray addObject:tmpData]; // this line carsh
NSLog(@"mchannel = %d---bufferIndex = %d",ioData->mBuffers[bufferIndex].mNumberChannels,bufferIndex);
}
}
}
班级为mixMArray
,
NSMutableArray
此次线路崩溃,
错误消息为[mycon->mixMArray addObject:tmpData];
。