No. For testing I loaded all Sounds as pyglet.media.StaticSound into a dict and call it from there. Same there: only the first sound works. Maybe the missing pyglet-loop because I don't run pyglet.app.run() ?
Am Dienstag, 17. Februar 2015 22:40:46 UTC+1 schrieb Richard Jones: > > Does pre-loading all the sounds make a difference? > > On Wed Feb 18 2015 at 8:21:19 AM Sebastian Meyer < > [email protected] <javascript:>> wrote: > >> Hmm, ok that sounds possible. >> I tried this: >> >> player = pyglet.media.Player() # init player >> player.play() # let player play >> >> def play_sound(name): >> path = name + ".wav" >> source = pyglet.media.load(path, streaming=False) >> print "Playing sound!", name >> player.queue(source) >> >> >> This works for exactly one sound. The second call of the function brings >> the print-statement but no sound. >> Did I missunderstand something? >> I tried also a player.play() after adding the source to the queue - same >> result. >> >> Thanks, >> Sebastian >> >> >> Am Dienstag, 17. Februar 2015 17:05:43 UTC+1 schrieb Rob: >> >>> I suspect a new player is created for every sound. The player registers >>> a stream. As long as the player is not destroyed, the stream remains >>> active. Try if you can control a single player: http://pyglet. >>> readthedocs.org/en/pyglet-1.2-maintenance/programming_guide/media.html >>> >>> Rob >>> >>> Op dinsdag 17 februari 2015 11:36:41 UTC+1 schreef Sebastian Meyer: >>>> >>>> Hi there! >>>> >>>> I have a small project which uses pyQt for the GUI. It is >>>> OS-independent and I want to add some sound-notifacation on it. >>>> After some searching I decided the best solution to have OS-independent >>>> sound-output is using pyglet for it. And it works great. >>>> >>>> But there is one problem: >>>> I'm using Linux with KDE and the mixer for adjusting the volume-level >>>> shows a modulator for every program that plays sound. >>>> But for my programm it shows a new regulator everytime I use pyglet to >>>> play a sound. So after the first sound, there appears one, after the >>>> second >>>> there are two and so on. >>>> >>>> I'm playing the sound as descripted here: >>>> http://www.pyglet.org/doc/programming_guide/playing_ >>>> sounds_and_music.html >>>> >>>> Any ideas? >>>> >>>> Cheers >>>> Sebastian >>>> >>> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/pyglet-users. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
