title: How can I stop AudioToolbox sound?
body: <p>I have two different button press sound actions. When I press one button it should play one sound, when I press the other, it should stop the first sound and play the other, How can I do this?</p>
  
  <p>Thanks,</p>
  
  <pre><code>-(void) onButtonPressAlbina {
      [soundID2 stop];     
      NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"albina" ofType:@"m4a"];
      SystemSoundID soundID;
      AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath: soundPath], &amp;soundID);
      AudioServicesPlaySystemSound (soundID);
  }
  
  -(void) onButtonPressBalena {
      NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"balena" ofType:@"m4a"];
      SystemSoundID soundID;
      AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath: soundPath], &amp;soundID);
      AudioServicesPlaySystemSound (soundID);    
  }
  </code></pre>