You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On latest master, Ubuntu 14.04.
There appears to be a bug in how Pyglet handles EOS. Using this bit of code
(where "noise.wav" is just 1 second of noise):
from time import sleep
from pyglet.media import Player, load
noise = load('noise.wav', streaming=False)
x = Player()
x.eos_action = Player.EOS_PAUSE
x.queue(noise)
x.play()
sleep(0.5)
print(x.playing)
x.pause()
x.seek(0)
sleep(0.5)
x.play()
As expected, I get 500 ms noise, an terminal output of "True" (x.playing), 500
ms silence, then 1000 ms noise. However, if I change the first "sleep" call to
be 1.5 seconds (i.e., longer than the sound), then I get 1000 ms noise, an
output of "True" (even though by that point the stream should have been
paused), and then silence -- the second play() doesn't cause any output. So I
think somehow "EOS_PAUSE" is not actually effectively calling "x.pause()" (or
doing the equivalent under the hood) as it should be.
If this makes sense, I can try to take a look at the Pyglet sound code to see
if I can figure out why this is happening, but that code still confuses me a
bit...
Original issue reported on code.google.com by [email protected] on 21 May 2014 at 6:58
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 21 May 2014 at 6:58The text was updated successfully, but these errors were encountered: