Re: Looping music and sounds in pyglet 1.3.1

2018-03-25 Thread Benjamin Moran
This was not terribly well documented, and I have not used this much myself 
in the past, but the basic idea is:
1. Create a SourceGroup, and queue a few Sources on it.
2. Queue the SourceGroup onto a Player, just as you would a single Source.

You can set the `loop` boolean on the SourceGroup instance. The SourceGroup 
is also a bit restrictive, because it must contain audio of the same 
format.  As you can see this is a little bit tedious. 

Fortunately, Dan did a very nice bit of work cleaning this up for the 
upcoming 1.4 release.  The SourceGroup has been retired, and the Player 
class itself now has a `Player.loop` attribute that you can just set to 
True. This will cause the currently playering Source to loop as expected, 
or until `next_source()` is called.

If it is possible for you to upgrade to the 1.4a release, please give that 
a try. Feedback is most appreciated, because of the aformentioned changes. 

-Ben



On Sunday, March 25, 2018 at 5:02:42 PM UTC+9, dodgyville wrote:
>
> Hi, is there a canonical way to loop a sound file? The docs mention 
> SourceGroup but I'm not sure how to get the current one from the player.
>

-- 
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 pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.


Looping music and sounds in pyglet 1.3.1

2018-03-25 Thread Luke Miller
Hi, is there a canonical way to loop a sound file? The docs mention
SourceGroup but I'm not sure how to get the current one from the player.

-- 
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 pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.