Martin Cote
Martin Cote

Reputation: 29852

iPhone: how to let the music play for an application using OpenAL?

I'm writing an iPhone app that uses OpenAL. When the application starts, the music playing in background stops.

The music actually stops playing when I initialize the OpenAL library.

My question is, is there any way to use OpenAL while letting the background music play?

Upvotes: 2

Views: 1496

Answers (1)

Dave
Dave

Reputation: 453

You need to change the Audio Session Category to kAudioSessionCategory_AmbientSound instead of kAudioSessionCategory_SoloAmbientSound which is the default.

You can find out more about it in the Audio Session Programming Guide. Here's a link to the relevant part of the documentation.

Upvotes: 4

Related Questions