Search Unity

Question Is it possible to mute other audio sources during runtime?

Discussion in 'Audio & Video' started by meowmeow11, Dec 25, 2020.

  1. meowmeow11

    meowmeow11

    Joined:
    Sep 28, 2020
    Posts:
    2
    Unity provides an option (ie muteOtherAudioSources) in PlayerSettings to mute other application audio sources. However, this is a build time option.
    I want only mute other application audio sources, while my application audio source is playing. That's I am looking for a runtime option.

    Just wondering if there's such option available in Unity framework?
    If not, what can I do to achieve this, ie mute other application audio sources during runtime. ?

    Thank you!
     
  2. meowmeow11

    meowmeow11

    Joined:
    Sep 28, 2020
    Posts:
    2
    A bit of research. There's no easy solution to implement AudioFocus using Unity framework. Have to call Java code to achieve that.