Objective-C指针类型的隐式转换.桥接演员问题

Ton*_*ite 7 types pointers objective-c ios

我收到以下错误:

"Implicit conversion of Objective-C pointer type. Type "void*" requires a bridged cast.
Run Code Online (Sandbox Code Playgroud)

我已经用桥来修复类似的代码 - 但是这些类型的修复在这里没有帮助.这是代码的一部分:

AURenderCallbackStruct input;
input.inputProc = RenderTone;
input.inputProcRefCon = self;
err = AudioUnitSetProperty(
    toneUnit, 
    kAudioUnitProperty_SetRenderCallback, 
    kAudioUnitScope_Input,
    0, 
    &input, 
    sizeof(input));
NSAssert1(err == noErr, @"Error setting callback: %ld", err);
Run Code Online (Sandbox Code Playgroud)

第二个代码位有错误

SStatus result = AudioSessionInitialize(NULL, NULL, ToneInterruptionListener, self);
if (result == kAudioSessionNoError) {
    UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
    AudioSessionSetProperty(
        kAudioSessionProperty_AudioCategory,
        sizeof(sessionCategory),
        &sessionCategory);
}
Run Code Online (Sandbox Code Playgroud)

谢谢,提前获得所有帮助.

更新

问题解决了.桥梁铸造工作不正确.应该是:

 input. inputProcRefCon =  (__bridge void*)self 
Run Code Online (Sandbox Code Playgroud)