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