Je n'arrive pas à comprendre.Comment faire un tableau de SystemSoundID
je peux jouer un son avec:
- (void) initSounds {
// Get the main bundle for the app
CFBundleRef mainBundle;
mainBundle = CFBundleGetMainBundle();
// Get the URL to the sound file to play
soundFileURLRef = CFBundleCopyResourceURL (mainBundle,CFSTR ("1"),CFSTR ("wav"),NULL);
// Create a system sound object representing the sound file
AudioServicesCreateSystemSoundID (soundFileURLRef, &soundFileObject);
}
-(void) play {
AudioServicesPlaySystemSound(self.soundFileObject);
}
Mais je veux créer un tableau d'objets SystemSoundID. Quand j'essaye de faire ceci je continue à recevoir des erreurs. Quelqu'un peut-il me montrer le code pour créer un tableau de soundFileObjects et comment j'utilise ce tableau dans AudioServicesPlaySystemSound?
J'ai posté une autre réponse à l'aide d'objets [ici ][1]. [1]: http://stackoverflow.com/a/26701297/951349 – smileBot