我正在尝试实现Matt Gallagher的AudioStreamer类,我在Audiostream.m文件上得到了20+错误,基本上是这样的:
Cast of C pointer type 'void *' to Objective-C pointer type 'AudioStreamer *' requires a bridged cast
我是iOS的新手。我知道ARC是什么,但是这个错误是什么意思?
发布于 2012-05-30 06:46:10
如错误所示,您需要一个bridged cast。请阅读该问题,了解可用的桥接转换之间的差异。如果您有时间,请观看WWDC 2011 session 323。
你可能只需要这样的东西:
AudioSessionInitialize (
NULL, // 'NULL' to use the default (main) run loop
NULL, // 'NULL' to use the default run loop mode
MyAudioSessionInterruptionListener, // a reference to your interruption callback
(__bridge void *)(self) // data to pass to your interruption listener callback
);https://stackoverflow.com/questions/10807628
复制相似问题