Click here to Close
 
打印

[APP开发] 在程序中加入声音

在程序中加入声音

下面这段代码可以不影响ipod的播放。


GSEventPlaySoundAtPath(@”/path/to/a/sound.aif”)
编译时加入-framework GraphicsServices.framework

相关的还有:
GSEventPlayAlertOrSystemSoundAtPath
GSEventPlaySoundLoopAtPath
GSEventPrimeSoundAtPath
GSEventStopSoundAtPath

TOP

楼猪想说什么啊!不明白!

TOP

能执行没问题,不过laoren大大能帮忙发一下定义嘛,我找遍了GraphicsServices.h也没找到。总是会出一个warning说我函数没有声明。而且非常奇怪编译Gansa就没有warnning,但是我也没找到它对这些函数的定义。

TOP

楼上的,我也没找着.

TOP

laoren看一下这个Gangsa吧:

http://www.iamas.ac.jp/~aka/iphone/#Gangsa.app

在我这里编译它就没有warning,好奇怪。

TOP