[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] sound crackle fix? update version?



On Sat, Dec 27, 2008 at 7:11 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> mp3 should load fine from a file - it may have problems with loading from a
> buffer or file-like object or for mixer.music, but I think it's an oversight
> that it's not listed for the Sound constructor.
>
> I think the problem is that the mixer is getting shutdown when you script
> ends, stopping the playback. Try running a script that waits for the

I also had that code in a game, that has a render loop till, you quit.
If the sound object is still in scope during render, then would this
not apply?

Because the problem happened there too.

> playback to finish, either with just an arbitrary delay (time.sleep(3) ) or
> waiting for the channel to be done, so something like this:
>        pygame.mixer.init()
>        s = pygame.mixer.Sound( path + "\CMaj.mp3" )
>        chan = s.play()
>        while chan.get_sound() != None:
>               pass
>
> If you are still experiencing any kind of problem with 1.8.1 or the 1.9.0
> pre-release builds, please submit a bug report (email the list or at the
> bugzilla page) including both the script and the sound file needed to
> reproduce the problem

Email the bug to this list? I'll get the sample code and files
together, and send it.
-- 
Jake