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

Re: [pygame] Sound to Light



On Sat, 2006-08-19 at 02:29 +1000, Alex Holkner wrote:
> hook this callback in Pygame, but Pygame-ctypes provides it (via 
> SDL-ctypes using Mix_RegisterEffect).

At one point we had played with the idea of allowing a python callback
to hook into the Mix_RegisterEffect. One thing that makes this tricky is
that the SDL mixer runs in a separate thread, so it required the mixer
to grab the GIL before it could run the callback. This had occasional
overhead problems depending on how long it took python to get back.

Things may be better nowadays with faster machines. We were thinking as
a backup approach the sound samples could be copied into some sort of
live Numeric array without needing to grab the GIL. In the end there
wasn't enough demand and this stuff sort of floated off.