On Mon, Jul 20, 2009 at 6:44 AM, Jerzy Jalocha N <jjalo...@gmail.com> wrote:

> def play_maxtime(sound, duration):
>    sound.play(loops=-1, maxtime=duration)
>    pygame.time.delay(duration)
>
> I have a few questions about this:
>
>  * Why is it that play_maxtime doesn't work without the time.delay?
> When I remove the delay line, no sound is played, despite the use of
> the maxtime argument.

Make sure you aren't calling it repeatedly.  I once had a problem like this
that was solved by not calling the sound repeatedly.  What can happen is
that the auto-channels will get filled with queued sounds, and won't have a
chance to play before being called again.  This may or may not be your
problem.

Reply via email to