Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOS_PAUSE bug #745

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments
Open

EOS_PAUSE bug #745

GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

In case you want the noise sample:

http://faculty.washington.edu/larsoner/noise.wav

Original comment by [email protected] on 21 May 2014 at 6:59

@GoogleCodeExporter
Copy link
Author

Could it be related to this? 
https://code.google.com/p/pyglet/issues/detail?id=651

Original comment by useboxnet on 22 May 2014 at 5:06

@GoogleCodeExporter
Copy link
Author

I just commented on that bug -- I can't load the given sample to test it.

Original comment by [email protected] on 22 May 2014 at 5:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant