User Tag List

Results 1 to 2 of 2

Thread: Allowing iPod music in a game

  1. #1
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Allowing iPod music in a game

    This is something that I stumbled upon last night and put in the iOS exporter owner's lounge - I've seen a couple of people asking how to allow iPod music to play while a game is running. It requires a small change to some of the exported code - you need to go into CSoundPlayer.m and change lines 47-48 from this:

    Code:
    UInt32 sessionCategory=kAudioSessionCategory_SoloAmbientSound;
    AudioSessionSetProperty(kAudioSessionCategory_SoloAmbientSound, sizeof(sessionCategory), &sessionCategory);
    To this:

    Code:
    UInt32 sessionCategory=kAudioSessionCategory_AmbientSound;
    AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
    This will let any running iPod music continue in the background, together with your game's sound.

  2. #2
    No Products Registered

    Join Date
    Dec 2014
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cant seem to find it on CSoundPlayer.m

Similar Threads

  1. iPod Music during game?
    By netninja in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 27th April 2015, 02:54 PM
  2. [REQUEST] iPod Music during app
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 3rd March 2014, 09:16 PM
  3. Fortitude! New game for iPhone, iPod Touch and iPad.
    By Pineapple in forum iOS Released Games & Apps
    Replies: 10
    Last Post: 2nd January 2013, 12:08 AM
  4. My game was rejected because game music plays over phone music
    By leuvsion in forum XNA Export Module Version 2.0
    Replies: 18
    Last Post: 1st August 2012, 07:49 PM
  5. iPod music during game - Solved! (I think)
    By DavidN in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 16th February 2012, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •