[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] SDL-mixer - timing / response



campbell barton wrote:
I was just wondering if SDL-mixer (from pygame) capable of playing
sounds at low latency for the application of a mod tracker / audio
sequencer, playing beats in time?
the biggest factor in SDL_mixer's latency is which audio backend SDL is currently using. if it is using something like ALSA or DIRECTX the latency is very short. but if it ends up using something like WIN32 or ESD then the latency will be noticeable.

still, the way SDL and SDL_mixer are written doesn't allow for "realtime" audio playback. where will always be a little latency, but it can likely be done fast enough not to notice? (not sure?)

one thing you can do with pygame that will help, is to lower the size of SDL's internal audio buffer. you can set this in the call to pygame.mixer.init() (or pygame.mixer.pre_init()).
http://pygame.org/docs/ref/pygame_mixer.html#init




____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org