Turn all audio off to prevent use of speaker / headphone

Help! When I run my program using panda3d as viewer (I am not playing any sound), panda3d automatically uses my speakers/headphone even though I am not running any sound.
It is really annoying because it is taking over the control of my Bluetooth headphone that I am using with another application, just to play white noise…
I already tried to remove the task ‘audioLoop’ from the taskManager, it seemed to work for a while but now the problem is occurring again even after remove the ‘audioLoop’.
I also tried base.musicManager.stopAllSounds() and base.disableAllAudio(), nothing seems to work.

Any idea?

If you don’t need sound, you can try the following. Before creating an instance of ShowBase.

from panda3d.core import loadPrcFileData
loadPrcFileData("", "audio-library-name null")

You can simply add a line with the configuration file etc/Config.prc

audio-library-name null

1 Like

Editing the config file worked like a charm, thank you so much you made my day! :smiley:

EDIT: I tried the loadPrcFileData solution and it works perfectly too.