Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone AudioServicesCreateSystemSoundID做什么?_Iphone_Objective C_Cocoa_Ipad - Fatal编程技术网

Iphone AudioServicesCreateSystemSoundID做什么?

Iphone AudioServicesCreateSystemSoundID做什么?,iphone,objective-c,cocoa,ipad,Iphone,Objective C,Cocoa,Ipad,AudioServicesCreateSystemSoundID做什么 我只能在苹果的网站上找到这个: // Create a system sound object representing the sound file AudioServicesCreateSystemSoundID ( soundFileURLRef, &soundFileObject ); 而且这也不是很有帮助。我总是看到它被创建,但从未使用过。它用于播放简短的声

AudioServicesCreateSystemSoundID
做什么

我只能在苹果的网站上找到这个:

// Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (
        soundFileURLRef,
        &soundFileObject
    );

而且这也不是很有帮助。我总是看到它被创建,但从未使用过。

它用于播放简短的声音和警报。请参阅下面的示例代码片段

代码稍微多一些


然而,我所看到的最好的示例代码是第17.2章。你可以从书中下载代码。查找SystemSoundsDemo项目。

如何链接现在已断开。我不确定该用什么替换它,否则我会编辑答案。这是相关的,但名称略有不同: