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

Re: [pygame] Mixer Quit / Restart



I have not done that, as I don't keep track of channels after they are obtained and started playing. Is there anything which can return a list of all currently active channels?

Now that being said, in my real program, I am able to recreate the bug even when waiting for all currently playing sounds to stop, before selecting the new configuration. Unless channel.stop() results in a different state from just leaving the channel to finish playing the sound by itself, I don't think that it should matter.

Cheers

Lenard Lindstrom wrote:
Did you try calling Channel.stop before calling quit?

Lenard


Wyatt Olson wrote:
This seems to work. It would be nice to be able to re-init the mixer, in case there were different bitrates, but if that can't work, I can just specify that the samples must all be the same bitrate.

Thanks for the quick replies, all!

Cheers

On Tue, Jul 1, 2008 at 2:22 PM, Wyatt Olson <wyatt.olson@xxxxxxxxx <mailto:wyatt.olson@xxxxxxxxx>> wrote:

    Cool, I'll give that a shot, and let you know what happens.

    Cheers


    On Tue, Jul 1, 2008 at 2:20 PM, Ian Mallett <geometrian@xxxxxxxxx
    <mailto:geometrian@xxxxxxxxx>> wrote:

        James, yes, I realized this was a test case, the questions
        apply to that.  Thanks for clearing that up. :-)

        Why reinit the mixer?  Are the sounds necessarily different
        bitrates?
        If you want to delete things, I believe you can use
        del(pointer_to_sound) or something, which should not require a
        mixer reinit.