On Thu, Dec 11, 2008 at 5:12 PM, Alex Holkner <[email protected]>wrote:
> > On 12/12/08, Tristam MacDonald <[email protected]> wrote: > > I am manufacturing procedural sound for my Pong example, and wanted to > use > > pyglet.media.procedural. I reallise that this module is probably in > alpha, > > since it is undocumented. > > > > The basic modules seem to work fine, but I can't get them to play more > than > > once. If you run the following example, the sound will only play the > first > > time: > > > > > > > import pyglet > > > > > > from pyglet.media import procedural > > > > > > > > > > > > p = procedural.Sine(0.1, 440) > > > #p = pyglet.media.load('ball.wav', streaming=False) > > > > > > > > > > > > def update(dt): > > > > > > p.play() > > > > > > > > > > > > pyglet.clock.schedule_interval(update, 1.0) > > > > > > > > > > > > pyglet.app.run() > > > > This example works fine if you load the wav file instead, and will play > once > > per second. > > > > Is there an easy way to modify the ProceduralSource class to allow > multiple > > players? > > A ProceduralSource is like any other source in that it can only be > played once. You need to wrap it in a StaticSource to play more than > once. Ah, that explains it - I must have missed that section of the docs. Thanks, - Tristam > Alex. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
