Re: 1.2alpha1 audio issues

47 views
Skip to first unread message

Nathan

unread,
Nov 25, 2012, 7:49:07 PM11/25/12
to pyglet...@googlegroups.com
What format of sound file are you using?


On Thu, Nov 22, 2012 at 1:35 PM, Walter Woods <woods...@gmail.com> wrote:
Hey, new to pyglet but I've been using it for a game on a newish Mac OS X.

While audio works, it frequently stutters and freezes the ENTIRE APPLICATION graphically if I play too many sounds at once (even with a forced 4-channel setup, where I don't let my app play more than 4 sounds at once).  The application continues after all of the audio files have finished playing, but it seems to have "continued" underneath - that is, when it freezes, multiple updates happen, rather than just one update with an absurdly large delta.  

It's pretty disruptive and pretty sad to only play 4 sounds at a time and still have some major performance issues... seems like a bug.  Anyone seen anything like this?  And I'm loading my sounds like: 

pyglet.media.load(soundFile, streaming = False)

So it would seem to not be the streaming vs StaticSource thing.

Any suggestions would be awesome, Thanks!

Walt

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/PHAwJ7iU8O0J.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.

Walter Woods

unread,
Nov 30, 2012, 11:02:59 AM11/30/12
to pyglet...@googlegroups.com
AIF.  I found the problem though.  The openal driver isn't properly releasing all buffers for whatever reason, which means that it's just running out of buffers.

See attached patch.
pyglet.patch

Walter Woods

unread,
Nov 30, 2012, 11:03:26 AM11/30/12
to pyglet...@googlegroups.com
Oh, there was also a thread starvation issue.  That's why I had to add a sleep as well.

Nathan

unread,
Dec 1, 2012, 3:00:26 PM12/1/12
to pyglet...@googlegroups.com
Richard or another commiter, please take note of Walter's patch!

Walter, did you create an issue on the google project tracker for this?  It's less likely to fall through the cracks if you do.


~ Nathan


To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/s1V7QymEgkMJ.

Richard Jones

unread,
Dec 1, 2012, 7:01:05 PM12/1/12
to pyglet-users
The patch wasn't against pyglet trunk so I had to manually apply the changes.

Walter (and other interested parties) please try out the changes to
make sure it's all as intended!


Richard
Reply all
Reply to author
Forward
0 new messages