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

Re: [pygame] Better Python music playback?



On Mon, May 25, 2009 at 4:13 PM, Nathan Whitehead <nwhitehe@xxxxxxxxx> wrote:
> Yeah, the synchronization problem is annoying.  That's the main
> motivation why I wrote swmixer.  Take a look at the documentation
> page, under the section EXPLICIT TICK INTERFACE.
> http://code.google.com/p/pygalaxy/wiki/SWMixer
>
> That section shows how you can calculate chunks of sound and
> synchronize exactly with the game video framerate.  That method works
> much better for rhythm games where loss of synchronization screws up
> the whole game.  If you try out swmixer and have problems, let me
> know.
>
> -- Nathan
>


by the way, you should be able to load an ogg into memory with a
pygame Sound, then use sndarray to get the data to pass off to
swmixer.

Otherwise you could try using pyogg/pyvorbis/python-ogg... but that's
not packaged up nicely for many non-unix systems.

cu,