Hi, I am using pyglet only to play wav files on user events. At first it 
works fine but if I let it alone for a few hours the files will play but 
with horrible crakling noises. I cant say if it still happens if I keep 
playing stuff. If I play the same file outside of the python program with 
aplay it sounds fine. I am using openal. I only have alsa installed, no 
pulseaudio.I am basically doing this every time I need to play a file:

if self.player:
    self.player.pause()
    self.player.delete()
self.player.queue(pyglet.media.load(file_path, streaming=False))
self.player.play()
Timer(self.player.source.duration + 0.01, self.pause_audio).start()


I am not doing anything on_eos or on_player_eos because I could make them 
work. Thats why I set a Timer and then call pause and delete. The pause and 
delete part at the top is to stop playing the previous clip if it was still 
playing. I have tried re-instantiating the player after delete() but it 
doesnt make any difference. 

On another note, the volume in pyglet is much lower than with aplay even if 
its at the maximum. Its not such a big issue because it is the only app 
playing sounds and I added a preamp with alsa.  

Python ver: 2.7.13
Pyglet ver: 1.3.2
Computer: Beaglebone

Thanks for your help. 



-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyglet-users/e8cc2dd5-625c-4a51-8539-00c0f9dae26a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to