2

I am trying to play a wav-file with the bit rate 2116kbps with Python using the OpenAL library but it only produces white noise. What am I missing?

The audio file is working properly if I use VLC-player. The file also works fine if I reduce the bit rate to 1411kbps. I am running Python3.7.2

>>> import openal
>>> source = openal.oalOpen("test.wav")
>>> source.play() # Makes white noise
RasmusN
  • 147
  • 1
  • 12

1 Answers1

0

With openAl you need to keep checking if the file is still playing

while source.get_state() == AL_PLAYING:

time.sleep(1)

And don't forget to close it

oalQuit()