title: Creating and playing a sound in swift
body: <p>So what I want to do is create and play a sound in swift that will play when I press a button, I know how to do it in Objective-C, but does anyone know how to in Swift?</p>
  
  <p>It would be like this for Objective-C:</p>
  
  <pre><code>NSURL *soundURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"mysoundname" ofType:@"wav"]];
  AudioServicesCreateSystemSoundID((__bridge CFURLRef)soundURL, &amp;mySound);
  </code></pre>
  
  <p>And then to play it I would do:</p>
  
  <pre><code>AudioServicesPlaySystemSound(Explosion);
  </code></pre>
  
  <p>Does anyone know how I could do this?</p>