[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] bug in 1.7.1 -- random channel endevents (with patch and workaround)
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] bug in 1.7.1 -- random channel endevents (with patch and workaround)
- From: "Brian Fisher" <brian@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Feb 2008 23:51:35 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 23 Feb 2008 02:51:40 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=08UR0mA7Yogcgdz+Pal/KfWtqVVAYMt47TrW5by388Q=; b=hRI5RRi0StGNUv5tHbiRYKkBdDaD5+1jDnQGAYgwlLP+iCPYdkWNcGeX58DymJrFzfCR6fyf9BWDvOZdir7VAUpesgDBYaUikXApVoSSGvoXTcVmNKM2kARBlkG0+ye7jHqnTbA4MjMbtsat5CK2T7NNo6wZzy0Pujosm1Vu1C8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=EYUX8F56nZHhRlHMYGMo7zvvqjEwmMbGOH4h83EnHsRFCFGrEQV2cMOl1G6cAlY+eUP0yJSYORN+RlDpclVu4wAsW229bjCVGKYjAD/EkUHuvlEajmxQku1VtvwfkqqwXC/tx7C0Yo27twNCvMCYtXOOfUZQJCRWkaUqJRK+QpM=
- In-reply-to: <473313CE.7010604@xxxxxxxxxxxxxxx>
- References: <473313CE.7010604@xxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
thanks for the fix!
committed in r1126
On Thu, Nov 8, 2007 at 5:49 AM, Douglas Bagnall <douglas@xxxxxxxxxxxxxxx> wrote:
> hi all,
>
> Quite recently the thing I am working on developed the habit of firing
> apparently meaningless events, thus:
>
> <Event(76-Unknown {})>
> <Event(114-Unknown {})>
> <Event(97-Unknown {})>
> <Event(204-Unknown {})>
> <Event(44-Unknown {})>
> <Event(111-Unknown {})>
>
> occasionally the series contains a 12, which tends to halt things, and
> without which I might not have noticed.
>
> I had a poke around and found that if you raise the number of mixer
> channels (as I had), the reallocated memory is not properly initialised.
> This can make any kind of event occur, or none, depending on the
> previous state of the memory. The patch below should fix things,
> although to be honest I have not actually compiled it, as it is simpler
> to do something like this:
>
> for i in range(mixer.get_num_channels()):
> mixer.Channel(i).set_endevent()
>
>
> anyway, thanks for pygame.
>
>
> Douglas Bagnall
>
> -------------------
>
> --- mixer.c 2005-08-11 18:14:27.000000000 +1200
> +++ /tmp/mixer.c 2007-11-09 02:22:26.757467939 +1300
> @@ -1130,6 +1130,7 @@
> {
> channeldata[i].sound = NULL;
> channeldata[i].queue = NULL;
> + channeldata[i].endevent = 0;
> }
>