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:
(I did not try the loadPrcFileData because editing the config file was easier for me, but I am sure it would work perfectly)