2011-03-11 14 views

Respuesta

1

Esto es de 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   
}; 

Espero que esto ayude.

+0

Gracias, pero ¿qué pasa con todos estos nombres que podemos encontrar en los ejemplos que se muestran en la Web, como aquí: https://developer.apple.com/library/ios/#samplecode/SysSound/Listings/Classes_SysSoundViewController_m.html # // apple_ref/doc/uid/DTS40008018-Classes_SysSoundViewController_m-DontLinkElementID_6 – Oliver

+0

¿A qué nombres se refiere? – Viraj

+0

"TAP" en -> NSURL * tapSound = [[NSBundle mainBundle] URLForResource: @ "tap" withExtension: @ "aif"]; // Almacenar el URL como una instancia CFURLRef self.soundFileURLRef = (CFURLRef) [tapSound retener]; // Crea un objeto de sonido del sistema que representa el archivo de sonido. AudioServicesCreateSystemSoundID ( soundFileURLRef, y soundFileObject ); Encontré muchos otros en ejemplos web – Oliver

0

El único que conozco es kSystemSoundID_Vibrate, en AudioToolbox/AudioServices.h.

Cuestiones relacionadas