Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - Code of system sounds

Do you know where I can find the list of constants that points to iOS system sounds, to make me able to give them to the AudioServicesCreateSystemSoundID method ?

like image 689
Oliver Avatar asked Mar 11 '11 13:03

Oliver


People also ask

What are iPhone system Sounds?

System Sound Services provides a C interface for playing short sounds and for invoking vibration on iOS devices that support vibration. You can use System Sound Services to play short (30 seconds or shorter) sounds.

How do I remove system Sounds from my iPhone?

On supported models, go to Settings > Sounds & Haptics. Turn System Haptics off or on. When System Haptics is off, you won't hear or feel vibrations for incoming calls and alerts.

What are system Sounds?

We are a sci-art outreach project that translates the rhythm and harmony of the cosmos into music and sound.


1 Answers

This is from 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        
};

Hope this helps.

like image 143
Viraj Avatar answered Oct 28 '22 21:10

Viraj