Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

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.

dans General Discussion par Simon G. (1.0k points)

1 Réponse

+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 
par 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.
...