2009-03-16 5 views

Répondre

4

En supposant que votre objet SystemSoundID est "SystemSoundID"

UInt32 flag = 0; 
err = AudioServicesSetProperty(kAudioServicesPropertyIsUISound, 
           sizeof(UInt32), 
           &systemSoundID, 
           sizeof(UInt32), 
           &flag); 
+0

Sir i m en utilisant ce qu'il ne fonctionne pas. s'il vous plaît vérifier mon code. –

+0

SystemSoundID soundID; int err = AudioServicesSetProperty (kAudioServicesPropertyIsUISound, sizeof (UInt32), & UILocalNotificationDefaultSoundName, sizeof (UInt32), &flag); AudioServicesPlaySystemSound (err); –