Hello everyone,
I am developing a Python project on macOS. I am experiencing a critical issue where background music loads perfectly, detects its full duration, but refuses to actually play.
Here are the details and what I have verified so far:
· OS: macOS (CocoaGraphicsPipe)
· Panda3D version: 1.10.16
· The Symptom: When calling .play(), the audio remains silent and the state check returns False.
Verification output:
self.mainMenuMusic.length()returns254.04(The file path and structure are correct and found by the loader).self.mainMenuMusic.status() == AudioSound.BADreturnsFalse(The file is not corrupted).self.mainMenuMusic.status() == AudioSound.PLAYINGreturnsFalse.
What I have already tried without success:
- Using
.mp3,.wav, and.oggformats (ensuring they are Stereo 44100Hz). - Forcing the OpenAL library via PRC data:
loadPrcFileData("", "audio-library-name p3openal_audio") - Setting the threshold to zero:
loadPrcFileData("", "audio-preload-threshold 0")
Here is my code:
self.mainMenuMusic = self.loader.loadMusic(“Minecraft soundtrack/Minecraft.mp3”)
self.mainMenuMusic.setLoop(True)
self.mainMenuMusic.setVolume(2)
self.mainMenuMusic.play
Thanks.