title: AudioSession Deprecated, how do I play my sounds without disrupting music on iOS?
body: <pre><code>OSStatus e;
  // initialize the audio session. don't know if you already do this.
  e = AudioSessionInitialize(NULL, NULL, NULL, NULL);
  if (e)
  {
      NSLog(@"failed to start audiosession: %i", (int)e);
  
  }
  // ***********************************************************
  // * THIS IS THE CODE THAT MAKES OTHER AUDIO BE ABLE TO PLAY *
  // ***********************************************************
  UInt32 category = kAudioSessionCategory_AmbientSound;
  AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &amp;category);
  // ***********************************************************
  // *                         HOORAY                          *
  // ***********************************************************
  // activate the audio session. don't know if you already do this.
  e = AudioSessionSetActive(YES);
  if (e)
  {
      NSLog(@"failed to make audiosession active: %i", (int)e);
  }
  </code></pre>
  
  <p>This is the code I use to play sounds in my games without disrupting music in the background. However, most of this is deprecated now. What do I replace it with in iOS 7?</p>