OS-系统声音列表

转自:http://blog.youkuaiyun.com/piziliweiguang/article/details/9062031

AudioServices 转自网络----禚来强

demo下载 http://www.cocoachina.com/bbs/read.php?tid=85305&keyword=%CF%B5%CD%B3%7C%C9%F9%D2%F4

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   ↓ File name (iPhone)   ↓ File name (iPod Touch)   ↓ Category   ↓ Note   ↓
1000new-mail.cafnew-mail.cafMailReceived 
1001mail-sent.cafmail-sent.cafMailSent 
1002Voicemail.cafVoicemail.cafVoicemailReceived 
1003ReceivedMessage.cafReceivedMessage.cafSMSReceived 
1004SentMessage.cafSentMessage.cafSMSSent 
1005alarm.cafsq_alarm.cafCalendarAlert 
1006low_power.caflow_power.cafLowPower 
1007sms-received1.cafsms-received1.cafSMSReceived_Alert 
1008sms-received2.cafsms-received2.cafSMSReceived_Alert 
1009sms-received3.cafsms-received3.cafSMSReceived_Alert 
1010sms-received4.cafsms-received4.cafSMSReceived_Alert 
1011--SMSReceived_Vibrate 
1012sms-received1.cafsms-received1.cafSMSReceived_Alert 
1013sms-received5.cafsms-received5.cafSMSReceived_Alert 
1014sms-received6.cafsms-received6.cafSMSReceived_Alert 
1015Voicemail.cafVoicemail.caf-Available since 2.1
1016tweet_sent.caftweet_sent.cafSMSSentAvailable since 5.0
1020Anticipate.cafAnticipate.cafSMSReceived_AlertAvailable since 4.2
1021Bloom.cafBloom.cafSMSReceived_AlertAvailable since 4.2
1022Calypso.cafCalypso.cafSMSReceived_AlertAvailable since 4.2
1023Choo_Choo.cafChoo_Choo.cafSMSReceived_AlertAvailable since 4.2
1024Descent.cafDescent.cafSMSReceived_AlertAvailable since 4.2
1025Fanfare.cafFanfare.cafSMSReceived_AlertAvailable since 4.2
1026Ladder.cafLadder.cafSMSReceived_AlertAvailable since 4.2
1027Minuet.cafMinuet.cafSMSReceived_AlertAvailable since 4.2
1028News_Flash.cafNews_Flash.cafSMSReceived_AlertAvailable since 4.2
1029Noir.cafNoir.cafSMSReceived_AlertAvailable since 4.2
1030Sherwood_Forest.cafSherwood_Forest.cafSMSReceived_AlertAvailable since 4.2
1031Spell.cafSpell.cafSMSReceived_AlertAvailable since 4.2
1032Suspense.cafSuspense.cafSMSReceived_AlertAvailable since 4.2
1033Telegraph.cafTelegraph.cafSMSReceived_AlertAvailable since 4.2
1034Tiptoes.cafTiptoes.cafSMSReceived_AlertAvailable since 4.2
1035Typewriters.cafTypewriters.cafSMSReceived_AlertAvailable since 4.2
1036Update.cafUpdate.cafSMSReceived_AlertAvailable since 4.2
1050ussd.cafussd.cafUSSDAlert 
1051SIMToolkitCallDropped.cafSIMToolkitCallDropped.cafSIMToolkitTone 
1052SIMToolkitGeneralBeep.cafSIMToolkitGeneralBeep.cafSIMToolkitTone 
1053SIMToolkitNegativeACK.cafSIMToolkitNegativeACK.cafSIMToolkitTone 
1054SIMToolkitPositiveACK.cafSIMToolkitPositiveACK.cafSIMToolkitTone 
1055SIMToolkitSMS.cafSIMToolkitSMS.cafSIMToolkitTone 
1057Tink.cafTink.cafPINKeyPressed 
1070ct-busy.cafct-busy.cafAudioToneBusyThere was no category for this sound before 4.0.
1071ct-congestion.cafct-congestion.cafAudioToneCongestionThere was no category for this sound before 4.0.
1072ct-path-ack.cafct-path-ack.cafAudioTonePathAcknowledgeThere was no category for this sound before 4.0.
1073ct-error.cafct-error.cafAudioToneErrorThere was no category for this sound before 4.0.
1074ct-call-waiting.cafct-call-waiting.cafAudioToneCallWaitingThere was no category for this sound before 4.0.
1075ct-keytone2.cafct-keytone2.cafAudioToneKey2There was no category for this sound before 4.0.
1100lock.cafsq_lock.cafScreenLocked 
1101unlock.cafsq_lock.cafScreenUnlocked 
1102--FailedUnlock 
1103Tink.cafsq_tock.cafKeyPressed 
1104Tock.cafsq_tock.cafKeyPressed 
1105Tock.cafsq_tock.cafKeyPressed 
1106beep-beep.cafsq_beep-beep.cafConnectedToPower 
1107RingerChanged.cafRingerChanged.cafRingerSwitchIndication 
1108photoShutter.cafphotoShutter.cafCameraShutter 
1109shake.cafshake.cafShakeToShuffleAvailable since 3.0
1110jbl_begin.cafjbl_begin.cafJBL_BeginAvailable since 3.0
1111jbl_confirm.cafjbl_confirm.cafJBL_ConfirmAvailable since 3.0
1112jbl_cancel.cafjbl_cancel.cafJBL_CancelAvailable since 3.0
1113begin_record.cafbegin_record.cafBeginRecordingAvailable since 3.0
1114end_record.cafend_record.cafEndRecordingAvailable since 3.0
1115jbl_ambiguous.cafjbl_ambiguous.cafJBL_AmbiguousAvailable since 3.0
1116jbl_no_match.cafjbl_no_match.cafJBL_NoMatchAvailable since 3.0
1117begin_video_record.cafbegin_video_record.cafBeginVideoRecordingAvailable since 3.0
1118end_video_record.cafend_video_record.cafEndVideoRecordingAvailable since 3.0
1150vc~invitation-accepted.cafvc~invitation-accepted.cafVCInvitationAcceptedAvailable since 4.0
1151vc~ringing.cafvc~ringing.cafVCRingingAvailable since 4.0
1152vc~ended.cafvc~ended.cafVCEndedAvailable since 4.0
1153ct-call-waiting.cafct-call-waiting.cafVCCallWaitingAvailable since 4.1
1154vc~ringing.cafvc~ringing.cafVCCallUpgradeAvailable since 4.1
1200dtmf-0.cafdtmf-0.cafTouchTone 
1201dtmf-1.cafdtmf-1.cafTouchTone 
1202dtmf-2.cafdtmf-2.cafTouchTone 
1203dtmf-3.cafdtmf-3.cafTouchTone 
1204dtmf-4.cafdtmf-4.cafTouchTone 
1205dtmf-5.cafdtmf-5.cafTouchTone 
1206dtmf-6.cafdtmf-6.cafTouchTone 
1207dtmf-7.cafdtmf-7.cafTouchTone 
1208dtmf-8.cafdtmf-8.cafTouchTone 
1209dtmf-9.cafdtmf-9.cafTouchTone 
1210dtmf-star.cafdtmf-star.cafTouchTone 
1211dtmf-pound.cafdtmf-pound.cafTouchTone 
1254long_low_short_high.caflong_low_short_high.cafHeadset_StartCall 
1255short_double_high.cafshort_double_high.cafHeadset_Redial 
1256short_low_high.cafshort_low_high.cafHeadset_AnswerCall 
1257short_double_low.cafshort_double_low.cafHeadset_EndCall 
1258short_double_low.cafshort_double_low.cafHeadset_CallWaitingActions 
1259middle_9_short_double_low.cafmiddle_9_short_double_low.cafHeadset_TransitionEnd 
1300Voicemail.cafVoicemail.cafSystemSoundPreview 
1301ReceivedMessage.cafReceivedMessage.cafSystemSoundPreview 
1302new-mail.cafnew-mail.cafSystemSoundPreview 
1303mail-sent.cafmail-sent.cafSystemSoundPreview 
1304alarm.cafsq_alarm.cafSystemSoundPreview 
1305lock.cafsq_lock.cafSystemSoundPreview 
1306Tock.cafsq_tock.cafKeyPressClickPreviewThe category was SystemSoundPreview before 3.2.
1307sms-received1.cafsms-received1.cafSMSReceived_Selection 
1308sms-received2.cafsms-received2.cafSMSReceived_Selection 
1309sms-received3.cafsms-received3.cafSMSReceived_Selection 
1310sms-received4.cafsms-received4.cafSMSReceived_Selection 
1311--SMSReceived_Vibrate 
1312sms-received1.cafsms-received1.cafSMSReceived_Selection 
1313sms-received5.cafsms-received5.cafSMSReceived_Selection 
1314sms-received6.cafsms-received6.cafSMSReceived_Selection 
1315Voicemail.cafVoicemail.cafSystemSoundPreviewAvailable since 2.1
1320Anticipate.cafAnticipate.cafSMSReceived_SelectionAvailable since 4.2
1321Bloom.cafBloom.cafSMSReceived_SelectionAvailable since 4.2
1322Calypso.cafCalypso.cafSMSReceived_SelectionAvailable since 4.2
1323Choo_Choo.cafChoo_Choo.cafSMSReceived_SelectionAvailable since 4.2
1324Descent.cafDescent.cafSMSReceived_SelectionAvailable since 4.2
1325Fanfare.cafFanfare.cafSMSReceived_SelectionAvailable since 4.2
1326Ladder.cafLadder.cafSMSReceived_SelectionAvailable since 4.2
1327Minuet.cafMinuet.cafSMSReceived_SelectionAvailable since 4.2
1328News_Flash.cafNews_Flash.cafSMSReceived_SelectionAvailable since 4.2
1329Noir.cafNoir.cafSMSReceived_SelectionAvailable since 4.2
1330Sherwood_Forest.cafSherwood_Forest.cafSMSReceived_SelectionAvailable since 4.2
1331Spell.cafSpell.cafSMSReceived_SelectionAvailable since 4.2
1332Suspense.cafSuspense.cafSMSReceived_SelectionAvailable since 4.2
1333Telegraph.cafTelegraph.cafSMSReceived_SelectionAvailable since 4.2
1334Tiptoes.cafTiptoes.cafSMSReceived_SelectionAvailable since 4.2
1335Typewriters.cafTypewriters.cafSMSReceived_SelectionAvailable since 4.2
1336Update.cafUpdate.cafSMSReceived_SelectionAvailable since 4.2
1350--RingerVibeChanged 
1351--SilentVibeChanged 
4095--VibrateThere was no category for this sound before 2.2.
In the SDK this is the constant kSystemSoundID_Vibrate.


调用方法一:

    SystemSoundID myAlertSound;

    NSURL *url = [NSURL URLWithString:@"/System/Library/Audio/UISounds/begin_video_record.caf"];

    AudioServicesCreateSystemSoundID((__bridge CFURLRef)(url), &myAlertSound);    

    AudioServicesPlaySystemSound(myAlertSound);

调用方法二:

    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"pathForResource:@"Tock" ofType:@"aiff"];

    if (path) {

        SystemSoundID theSoundID;

        OSStatus error =  AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:path], &theSoundID);

        if (error == kAudioServicesNoError) {

            AudioServicesPlaySystemSound(theSoundID);            

        }

        else

        {

            NSLog(@"Failed to create sound ");

        }

    }



STM32电机库无感代码注释无传感器版本龙贝格观测三电阻双AD采样前馈控制弱磁控制斜坡启动内容概要:本文档为一份关于STM32电机控制的无传感器版本代码注释资源,聚焦于龙贝格观测器在永磁同步电机(PMSM)无感控制中的应用。内容涵盖三电阻双通道AD采样技术、前馈控制、弱磁控制及斜坡启动等关键控制策略的实现方法,旨在通过详细的代码解析帮助开发者深入理解基于STM32平台的高性能电机控制算法设计与工程实现。文档适用于从事电机控制开发的技术人员,重点解析了无位置传感器控制下的转子初始定位、速度估算与系统稳定性优化等问题。; 适合人群:具备一定嵌入式开发基础,熟悉STM32平台及电机控制原理的工程师或研究人员,尤其适合从事无感FOC开发的中高级技术人员。; 使用场景及目标:①掌握龙贝格观测器在PMSM无感控制中的建模与实现;②理解三电阻采样与双AD同步采集的硬件匹配与软件处理机制;③实现前馈补偿提升动态响应、弱磁扩速控制策略以及平稳斜坡启动过程;④为实际项目中调试和优化无感FOC系统提供代码参考和技术支持; 阅读建议:建议结合STM32电机控制硬件平台进行代码对照阅读与实验验证,重点关注观测器设计、电流采样校准、PI参数整定及各控制模块之间的协同逻辑,建议配合示波器进行信号观测以加深对控制时序与性能表现的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值