iOS调用AudioServicesPlaySystemSound方法播放系统声音


播放系统声音需要导入框架:AudioToolbox.framework

iOS调用AudioServicesPlaySystemSound方法播放系统声音_第1张图片
文档截图

System Sound ID 介绍如下:

AudioServices

AudioServices is a group of C functions in AudioToolbox for playing short (≤30 seconds) sounds.

Predefined sounds

There are some predefined system sounds, for the system sound ID in the range 1000 to 2000 (decimal), as shown below (from 2.0 to 5.0 beta). The system sounds are all stored in /System/Library/Audio/UISounds/.

Sound ID查询地址

你可能感兴趣的:(iOS调用AudioServicesPlaySystemSound方法播放系统声音)