MonoTouch播放系统声音

时间:2012-09-14 16:30:54

标签: c# ios xamarin.ios audiotoolbox system-sounds

当我出现警告对话框时,我想发出哔哔声。当推送通知出现时,如何播放声音?我需要的代码与这些链接类似:

http://iosdeveloperzone.com/2011/05/23/snippet-playing-a-system-sound/

我无法在任何地方找到此API:

AudioServicesPlaySystemSound

1 个答案:

答案 0 :(得分:2)

在MonoTouch中,此功能名为MonoTouch.AudioToolbox.SystemSound.PlaySystemSound

这里有关于如何播放文件声音的example