iOS 播放系统声音系统声音大全
在app开发中使用系统音效有震动,声音类。
设置方法如下
步骤1 添加所需库文件,即“AudioToolbox.framework”
步骤2 在使用类中添加头文件,即
#import <AudioToolbox/AudioToolbox.h>
步骤3 使用
3-0 定义
SystemSoundID soundID;
3-1 震动
soundID = kSystemSoundID_Vibrate;
AudioServicesPlaySystemSound(soundID)
3-2 系统声音播放
soundID = 1000;
AudioServicesPlaySystemSound(soundID)
3-3 系统声音停止
AudioServicesRemoveSystemSoundCompletion(soundID);
其中audioID就是你需要打开系统声音的id号:附上系统对应提示音对照表:
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 | File name (iPhone) | File name (iPod Touch) | Category | Note |
---|---|---|---|---|
1000 | new-mail.caf | new-mail.caf | MailReceived | 收到邮件 |
1001 | mail-sent.caf | mail-sent.caf | MailSent | 发送邮件 |
1002 | Voicemail.caf | Voicemail.caf | VoicemailReceived | 收到语音邮件 |
1003 | ReceivedMessage.caf | ReceivedMessage.caf | SMSReceived | 收到短信 |
1004 | SentMessage.caf | SentMessage.caf | SMSSent | 发送短信 |
1005 | alarm.caf | sq_alarm.caf | CalendarAlert | 日历提醒 |
1006 | low_power.caf | low_power.caf | LowPower | 电量低 |
1007 | sms-received1.caf | sms-received1.caf | SMSReceived_Alert | 收到短信警报 |
1008 | sms-received2.caf | sms-received2.caf | SMSReceived_Alert | |
1009 | sms-received3.caf | sms-received3.caf | SMSReceived_Alert | |
1010 | sms-received4.caf | sms-received4.caf | SMSReceived_Alert | |
1011 | - | - | SMSReceived_Vibrate | 收到短信震动 |
1012 | sms-received1.caf | sms-received1.caf | SMSReceived_Alert | |
1013 | sms-received5.caf | sms-received5.caf | SMSReceived_Alert | |
1014 | sms-received6.caf | sms-received6.caf | SMSReceived_Alert | |
1015 | Voicemail.caf | Voicemail.caf | - | Available since 2.1 |
1016 | tweet_sent.caf | tweet_sent.caf | SMSSent | Available since 5.0 |
1020 | Anticipate.caf | Anticipate.caf | SMSReceived_Alert | Available since 4.2 |
1021 | Bloom.caf | Bloom.caf | SMSReceived_Alert | Available since 4.2 |
1022 | Calypso.caf | Calypso.caf | SMSReceived_Alert | Available since 4.2 |
1023 | Choo_Choo.caf | Choo_Choo.caf | SMSReceived_Alert | Available since 4.2 |
1024 | Descent.caf | Descent.caf | SMSReceived_Alert | Available since 4.2 |
1025 | Fanfare.caf | Fanfare.caf | SMSReceived_Alert | Available since 4.2 |
1026 | Ladder.caf | Ladder.caf | SMSReceived_Alert | Available since 4.2 |
1027 | Minuet.caf | Minuet.caf | SMSReceived_Alert | Available since 4.2 |
1028 | News_Flash.caf | News_Flash.caf | SMSReceived_Alert | Available since 4.2 |
1029 | Noir.caf | Noir.caf | SMSReceived_Alert | Available since 4.2 |
1030 | Sherwood_Forest.caf | Sherwood_Forest.caf | SMSReceived_Alert | Available since 4.2 |
1031 | Spell.caf | Spell.caf | SMSReceived_Alert | Available since 4.2 |
1032 | Suspense.caf | Suspense.caf | SMSReceived_Alert | Available since 4.2 |
1033 | Telegraph.caf | Telegraph.caf | SMSReceived_Alert | Available since 4.2 |
1034 | Tiptoes.caf | Tiptoes.caf | SMSReceived_Alert | Available since 4.2 |
1035 | Typewriters.caf | Typewriters.caf | SMSReceived_Alert | Available since 4.2 |
1036 | Update.caf | Update.caf | SMSReceived_Alert | Available since 4.2 |
1050 | ussd.caf | ussd.caf | USSDAlert | USSD警报 |
1051 | SIMToolkitCallDropped.caf | SIMToolkitCallDropped.caf | SIMToolkitTone | |
1052 | SIMToolkitGeneralBeep.caf | SIMToolkitGeneralBeep.caf | SIMToolkitTone | |
1053 | SIMToolkitNegativeACK.caf | SIMToolkitNegativeACK.caf | SIMToolkitTone | |
1054 | SIMToolkitPositiveACK.caf | SIMToolkitPositiveACK.caf | SIMToolkitTone | |
1055 | SIMToolkitSMS.caf | SIMToolkitSMS.caf | SIMToolkitTone | |
1057 | Tink.caf | Tink.caf | PINKeyPressed | |
1070 | ct-busy.caf | ct-busy.caf | AudioToneBusy | There was no category for this sound before 4.0. |
1071 | ct-congestion.caf | ct-congestion.caf | AudioToneCongestion | There was no category for this sound before 4.0. |
1072 | ct-path-ack.caf | ct-path-ack.caf | AudioTonePathAcknowledge | There was no category for this sound before 4.0. |
1073 | ct-error.caf | ct-error.caf | AudioToneError | There was no category for this sound before 4.0. |
1074 | ct-call-waiting.caf | ct-call-waiting.caf | AudioToneCallWaiting | There was no category for this sound before 4.0. |
1075 | ct-keytone2.caf | ct-keytone2.caf | AudioToneKey2 | There was no category for this sound before 4.0. |
1100 | lock.caf | sq_lock.caf | ScreenLocked | |
1101 | unlock.caf | sq_lock.caf | ScreenUnlocked | |
1102 | - | - | FailedUnlock | |
1103 | Tink.caf | sq_tock.caf | KeyPressed | |
1104 | Tock.caf | sq_tock.caf | KeyPressed | |
1105 | Tock.caf | sq_tock.caf | KeyPressed | |
1106 | beep-beep.caf | sq_beep-beep.caf | ConnectedToPower | |
1107 | RingerChanged.caf | RingerChanged.caf | RingerSwitchIndication | |
1108 | photoShutter.caf | photoShutter.caf | CameraShutter | |
1109 | shake.caf | shake.caf | ShakeToShuffle | Available since 3.0 |
1110 | jbl_begin.caf | jbl_begin.caf | JBL_Begin | Available since 3.0 |
1111 | jbl_confirm.caf | jbl_confirm.caf | JBL_Confirm | Available since 3.0 |
1112 | jbl_cancel.caf | jbl_cancel.caf | JBL_Cancel | Available since 3.0 |
1113 | begin_record.caf | begin_record.caf | BeginRecording | Available since 3.0 |
1114 | end_record.caf | end_record.caf | EndRecording | Available since 3.0 |
1115 | jbl_ambiguous.caf | jbl_ambiguous.caf | JBL_Ambiguous | Available since 3.0 |
1116 | jbl_no_match.caf | jbl_no_match.caf | JBL_NoMatch | Available since 3.0 |
1117 | begin_video_record.caf | begin_video_record.caf | BeginVideoRecording | Available since 3.0 |
1118 | end_video_record.caf | end_video_record.caf | EndVideoRecording | Available since 3.0 |
1150 | vc~invitation-accepted.caf | vc~invitation-accepted.caf | VCInvitationAccepted | Available since 4.0 |
1151 | vc~ringing.caf | vc~ringing.caf | VCRinging | Available since 4.0 |
1152 | vc~ended.caf | vc~ended.caf | VCEnded | Available since 4.0 |
1153 | ct-call-waiting.caf | ct-call-waiting.caf | VCCallWaiting | Available since 4.1 |
1154 | vc~ringing.caf | vc~ringing.caf | VCCallUpgrade | Available since 4.1 |
1200 | dtmf-0.caf | dtmf-0.caf | TouchTone | |
1201 | dtmf-1.caf | dtmf-1.caf | TouchTone | |
1202 | dtmf-2.caf | dtmf-2.caf | TouchTone | |
1203 | dtmf-3.caf | dtmf-3.caf | TouchTone | |
1204 | dtmf-4.caf | dtmf-4.caf | TouchTone | |
1205 | dtmf-5.caf | dtmf-5.caf | TouchTone | |
1206 | dtmf-6.caf | dtmf-6.caf | TouchTone | |
1207 | dtmf-7.caf | dtmf-7.caf | TouchTone | |
1208 | dtmf-8.caf | dtmf-8.caf | TouchTone | |
1209 | dtmf-9.caf | dtmf-9.caf | TouchTone | |
1210 | dtmf-star.caf | dtmf-star.caf | TouchTone | |
1211 | dtmf-pound.caf | dtmf-pound.caf | TouchTone | |
1254 | long_low_short_high.caf | long_low_short_high.caf | Headset_StartCall | |
1255 | short_double_high.caf | short_double_high.caf | Headset_Redial | |
1256 | short_low_high.caf | short_low_high.caf | Headset_AnswerCall | |
1257 | short_double_low.caf | short_double_low.caf | Headset_EndCall | |
1258 | short_double_low.caf | short_double_low.caf | Headset_CallWaitingActions | |
1259 | middle_9_short_double_low.caf | middle_9_short_double_low.caf | Headset_TransitionEnd | |
1300 | Voicemail.caf | Voicemail.caf | SystemSoundPreview | |
1301 | ReceivedMessage.caf | ReceivedMessage.caf | SystemSoundPreview | |
1302 | new-mail.caf | new-mail.caf | SystemSoundPreview | |
1303 | mail-sent.caf | mail-sent.caf | SystemSoundPreview | |
1304 | alarm.caf | sq_alarm.caf | SystemSoundPreview | |
1305 | lock.caf | sq_lock.caf | SystemSoundPreview | |
1306 | Tock.caf | sq_tock.caf | KeyPressClickPreview | The category was SystemSoundPreview before 3.2. |
1307 | sms-received1.caf | sms-received1.caf | SMSReceived_Selection | |
1308 | sms-received2.caf | sms-received2.caf | SMSReceived_Selection | |
1309 | sms-received3.caf | sms-received3.caf | SMSReceived_Selection | |
1310 | sms-received4.caf | sms-received4.caf | SMSReceived_Selection | |
1311 | - | - | SMSReceived_Vibrate | |
1312 | sms-received1.caf | sms-received1.caf | SMSReceived_Selection | |
1313 | sms-received5.caf | sms-received5.caf | SMSReceived_Selection | |
1314 | sms-received6.caf | sms-received6.caf | SMSReceived_Selection | |
1315 | Voicemail.caf | Voicemail.caf | SystemSoundPreview | Available since 2.1 |
1320 | Anticipate.caf | Anticipate.caf | SMSReceived_Selection | Available since 4.2 |
1321 | Bloom.caf | Bloom.caf | SMSReceived_Selection | Available since 4.2 |
1322 | Calypso.caf | Calypso.caf | SMSReceived_Selection | Available since 4.2 |
1323 | Choo_Choo.caf | Choo_Choo.caf | SMSReceived_Selection | Available since 4.2 |
1324 | Descent.caf | Descent.caf | SMSReceived_Selection | Available since 4.2 |
1325 | Fanfare.caf | Fanfare.caf | SMSReceived_Selection | Available since 4.2 |
1326 | Ladder.caf | Ladder.caf | SMSReceived_Selection | Available since 4.2 |
1327 | Minuet.caf | Minuet.caf | SMSReceived_Selection | Available since 4.2 |
1328 | News_Flash.caf | News_Flash.caf | SMSReceived_Selection | Available since 4.2 |
1329 | Noir.caf | Noir.caf | SMSReceived_Selection | Available since 4.2 |
1330 | Sherwood_Forest.caf | Sherwood_Forest.caf | SMSReceived_Selection | Available since 4.2 |
1331 | Spell.caf | Spell.caf | SMSReceived_Selection | Available since 4.2 |
1332 | Suspense.caf | Suspense.caf | SMSReceived_Selection | Available since 4.2 |
1333 | Telegraph.caf | Telegraph.caf | SMSReceived_Selection | Available since 4.2 |
1334 | Tiptoes.caf | Tiptoes.caf | SMSReceived_Selection | Available since 4.2 |
1335 | Typewriters.caf | Typewriters.caf | SMSReceived_Selection | Available since 4.2 |
1336 | Update.caf | Update.caf | SMSReceived_Selection | Available since 4.2 |
1350 | - | - | RingerVibeChanged | |
1351 | - | - | SilentVibeChanged | |
4095 | - | - | Vibrate |
There was no category for this sound before 2.2. In the SDK this is the constant kSystemSoundID_Vibrate. |
iOS 播放系统声音系统声音大全相关推荐
- uni-app 声音/震动提示,播放系统默认消息声音 安卓(Android)测试通过
uni-app 声音/震动提示,播放系统默认消息声音 安卓(Android)测试通过 可以跟据自己需求使用,有不足的地方希望大家帮忙补充 参数 type Options vibrate:震动 othr ...
- HTML音乐播放没声音,网页没有声音但系统显示有声音怎么回事?如何解决?
网友提问:为什么网页没有声音,除了迅雷高清在线影院的视频有声音和本已经下载的歌或视频有声音外,其他网页都没有声音!就是网页没声音,其他一切正常! 网页没有声音但系统显示有声音:网页在线视频没有声音:网 ...
- win7旗舰版系统电脑没有声音怎么办
win7旗舰版系统电脑没有声音怎么办?近来有些win7旗舰版用户朋友遇到了一个奇怪的问题,昨天电脑还是好好的,今天打开电脑突然发现没有声音了,那么win7旗舰版没声音怎么修复呢?很多朋友不了解win7 ...
- alsa和oss声音系统比较
OSS(Open Sound System) OSS的含义为,Open Sound System,是unix平台上一个统一的音频接口.以前,每个Unix厂商都会提供一个自己专有的API,用来处理音频. ...
- 惠普笔记本重装系统后没有声音如何解决
最近很多小伙伴又开始了网上冲浪的生活,但是电脑用久了难免会发生一些故障的问题,最近就有些小伙伴重装系统之后问小编自己的电脑没有声音的问题?不要慌?接下来小编教你惠普笔记本重装系统后没有声音的解决方法 ...
- ios播放本地声音文件
从一段代码里找到几个片段: #import <AVFoundation/AVFoundation.h> #import <AudioToolbox/AudioToolbox.h> ...
- linux系统浏览器无声音,在Deepin 20系统中外接显示器切换后浏览器没有声音的解决经历...
如果你在Deepin 20系统遇到浏览器没有声音的问题,请看以下解决经历,或许能给你提供帮助.可先参考在Deepin系统中没有声音的解决办法. 浏览器没有声音的解决历程 在家里笔记本有时候需要外接HD ...
- 基于C++代码的UE4学习(四十六)——为坦克开火添加声音系统
声音播放涉及两种方式,一种是直接播放Wave,一种是通过cue进行播放. 先讲解第一种,直接播放音频文件(必须为Wave). USoundWave* fireSound; 添加在头文件中. 在源文件中 ...
- win10安装程序没有修复计算机,安装Win10系统突然没有声音怎么修复
Widow10系统中如果突然没有声音了,播放任何视频和音乐都没声音,影响正常使用. 没声音可能是声卡驱动出问题,如果声卡驱动正常但是没有声音就可能是设置问题.不管什么原因,首先找到故障问题,然后对症下 ...
- 游戏开发当中的声音系统
在游戏当中我们都会声音的播放,如果说没有声音的电影是没有灵魂的,那么没有声音的游戏就是行尸走肉.而且近年来的一些游戏,游戏内容都离不开声音.就比如LOL,如果你对面玩的塞恩,大家都知道它把,改版后是可 ...
最新文章
- 使用Angular可重用Component思路实现一个自带图标(icon)的input控件
- [机器学习]AutoML --- NNI (Microsoft)
- seaborn.heatmap概述
- 炒菜机器人的弊端_机器人炒菜真不是你想的那样!
- Chapter3-1_Speech Separation(Deep Clustering, PIT)
- sublime 插件安装;sublime的 babel、sublime-jsfmt插件
- python画图为什么运行不出来_PyCharm中Matplotlib绘图不能显示UI效果的问题解决
- c++/ boost 库常见错误及解决方法总结
- java破解ip屏蔽+多线程同步拨号-【多线程数据采集之五】
- IIS连接oralce数据提示“System.Data.OracleClient 需要 Oracle 客户端软件 8.1.7 或更高版本”...
- java日期处理SimpleDateFormat等
- java学生成绩管理系统源码(java学生信息管理 java成绩管理系统 java学生信息管理系统)
- STELLA—系统动力学仿真软件 System Dynamics仿真
- Win10 安装 Rational Rose
- 家庭生涯妙招,必定要看哦
- javascript动态插入html元素
- G31主板支持1440*900分辨率
- 程序员必须 知道的英语单词
- 15W无线充电芯片介绍
- 谁将成为中国版底特律?
热门文章
- nrf52 SDK15 TWI驱动MAG311x
- 计算机科学与技术学科交叉,计算机科学与技术学科方法论.ppt
- Probit模型、Logit模型、IV-Probit模型、IV-Probit模型
- android字体好看,Android:更好的自定义字体方案
- 【计算机网络】总结篇
- 矩阵光学 matlab,矩阵光学.doc
- Blog新域名启用 www.jimjin.cn 欢迎大家光临
- 词向量word to vector通俗理解
- 计算机软件科学家谢涛,计算机软件科学家谢涛:星辰大海,求思进取
- 问题解决:System.TypeLoadException: 未能从程序集“XXX”中加载类型“XXX