0

How can I let ipod playback continue when my app is on the run?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
valiantb
  • 47
  • 1
  • 1
  • 4

2 Answers2

4

At startup you need to init an AudioSession by calling

AudioSessionInitialize(NULL,NULL,NULL,NULL);

and then set your audio category to kAudioSessionCategory_AmbientSound, like so

UInt32  sessionCategory = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
AudioSessionSetActive(true);
Rhythmic Fistman
  • 34,352
  • 5
  • 87
  • 159
1

I'm pretty sure that it has nothing to do with your app (i.e. a special background service runs for the ipod), but i could be wrong...

RCIX
  • 38,647
  • 50
  • 150
  • 207