简体   繁体   English

Audiostreamer iOS类-ARC错误

[英]Audiostreamer iOS class - ARC error

I'm trying to implement Matt Gallagher's AudioStreamer class and I'm getting 20+ errors on Audiostream.m file that are basically reading: 我正在尝试实现Matt Gallagher的AudioStreamer类,并且在Audiostream.m文件上收到20多个错误, Audiostream.m错误基本上是在读取:

Cast of C pointer type 'void *' to Objective-C pointer type 'AudioStreamer *' requires a bridged cast

I'm new to iOS. 我是iOS新手。 I know what ARC is, but what does this error mean? 我知道ARC是什么,但是此错误是什么意思?

as the error suggests you need a bridged cast . 由于错误提示您需要桥接演员表 Please read that question for the differences between the available bridged casts. 请阅读该问题,以了解可用桥接转换之间的差异。 And if you have time watch WWDC 2011 session 323. 如果您有时间观看WWDC 2011大会323。


You probably just need something like this: 您可能只需要这样的东西:

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
);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM