gpt4 book ai didi

iPhone - 系统声音代码

转载 作者:行者123 更新时间:2023-12-03 19:01:20 26 4
gpt4 key购买 nike

你知道我在哪里可以找到指向 iOS 系统声音的常量列表,以便我能够将它们提供给 AudioServicesCreateSystemSoundID 方法吗?

最佳答案

这来自 AudioServices.h:

//==================================================================================================
#pragma mark AudioServices Constants

/*!
@enum AudioServices constants
@abstract Constants for use with System Sound portion of the AudioServices APIs.
@constant kSystemSoundID_UserPreferredAlert
Use this constant with the play sound APIs to
playback the alert sound selected by the User in System Preferences.
@constant kSystemSoundID_Vibrate
Use this constant with the play sound APIs to vibrate the device
- iPhone only
- on a device with no vibration capability (like iPod Touch) this will
do nothing
@constant kSystemSoundID_FlashScreen
Use this constant with the play sound APIs to flash the screen
- Desktop systems only
*/
enum
{
#if TARGET_OS_IPHONE
kSystemSoundID_Vibrate = 0x00000FFF
#else
kSystemSoundID_UserPreferredAlert = 0x00001000,
kSystemSoundID_FlashScreen = 0x00000FFE,
// this has been renamed to be consistent
kUserPreferredAlert = kSystemSoundID_UserPreferredAlert
#endif
};

希望这有帮助。

关于iPhone - 系统声音代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5273402/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com