1

I used AVAudioPlayer, but it's too laggy, if I use this code:

    NSString *soundFile = [[NSBundle mainBundle] pathForResource:@"MySound" ofType:@"caf"];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFile];
AudioServicesCreateSystemSoundID((CFURLRef)soundFileURL, &_MySound);
AudioServicesPlaySystemSound(_MySound);

There isn't any lagg.

But I have a button which mute/unmute everysound in my app. How can I mute these sounds like mysound.volume = 0 in AVAudioplayer

Castiblanco
  • 1,200
  • 4
  • 13
  • 32
Magyar Miklós
  • 4,182
  • 2
  • 24
  • 42

0 Answers0