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

Player.delete() doesn't unqueue audio #256

Closed
RiedleroD opened this issue Aug 2, 2020 · 4 comments
Closed

Player.delete() doesn't unqueue audio #256

RiedleroD opened this issue Aug 2, 2020 · 4 comments

Comments

@RiedleroD
Copy link

When Player.delete() is called, it doesn't unqueue the queued songs, and therefore blocks any queued StreamingSource from playing. Player.next_source() has to be called too to unqueue the StreamingSource.

That's unintuitive behaviour since deleting the player would prevent it from playing again, no? It just blocks the StreamingSource.

@benmoran56
Copy link
Member

Thanks for opening the ticket. If possible, could you show a small code example?

@RiedleroD
Copy link
Author

import pyglet
from time import sleep
mus=pyglet.media.load("sample.ogg",streaming=True)
pl=mus.play()
sleep(0.5)
pl.delete()
sleep(0.5)
pl=mus.play()
sleep(0.5)
pl.delete()
mus.delete()

what should happen: music plays for 0.5 seconds, then stops for 0.5sec, then starts over for 0.5sec.
what happens: music plays for 0.5sec, then stops for 0.5sec, then crashes with pyglet.media.exceptions.MediaException: This source is already queued on a player. on line 7.

@benmoran56
Copy link
Member

Thanks for the clarification. I'll have a look at this.

@benmoran56
Copy link
Member

Sorry that this got lost along the way, but it's now fixed in the 1.5-maintenance branch, and will be in the next point release.

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

No branches or pull requests

2 participants