Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

Hello

I'm trying to set up my Unity project to allow sounds from other applications to mix with my app audio, which is using wwise.

I've found the ios documentation about setting kAudioSessionCategories, and how it's set to default (see below)

But I can't for the life of me figure out how to actually set this in my Unity app.

Any ideas? 

Thanks

-From documentation

The Integration supports two audio session categories

  • kAudioSessionCategory_SoloAmbientSound (Default): When you use this category, audio from other apps is silenced. Your app's audio is also silenced by screen locking and by the Silent switch (called the Ring/Silent switch on the iPhone). However, when using SoloAmbientSound, an audio interruption, for example, an incoming phone call, or playing music with the Music app using a remote control, will seize the audio session from your app. To restore the audio later when you return to your app, you need to specify an interruption listener callback function to respond to the events of entering and exiting the audio interruption.
  • kAudioSessionCategory_AmbientSound: AmbientSound allows your app's audio to be mixed with other apps. Any audio interruptions, for example, an incoming phone call, or playing music with the Music app using a remote control, will be mixed with your app's audio as well.

See the API ListenToAudioSessionInterruption() in Wwise iOS SDK documentation for further information.

in General Discussion by Simon G. (1.0k points)

1 Answer

+1 vote

I actually got this working in my app the other day so I thought I'd share!

Using Unity 5 and Wwise 2014.1.4 - iOS integration package using a Mac for development

In the AkInitializer script

In the Awake function, find the line that initialises the platform settings;

AkPlatformInitSettings platformSettings = new AkPlatformInitSettings();

Then add this code somewhere after the above line......

        #if UNITY_IOS && ! UNITY_EDITOR

            platformSettings.eAudioSessionCategory = AudioSessionCategory.kAudioSessionCategory_AmbientSound;
            platformSettings.bMuteOtherApps = false;

        #endif 
by Simon G. (1.0k points)
Is there any update to this method? I'm trying to set the AudioSessionCategory in my project, but can't find the line you refer to in the Awake function of AkInitializer.
...