Anyone else notice initial delay with Mix_PlayChannel?

I’m getting a slight (~0.5 second ) delay between the call to
Mix_PlayChannel(-1,chunk,0) and the actual sound heard. The results are that
sound effects do not synchronize with visual effects. The delay occurs on
both Linux and Mac OS X, for various size WAV files. Has anyone else noticed
this delay?

Millaway, John wrote:

I’m getting a slight (~0.5 second ) delay between the call to
Mix_PlayChannel(-1,chunk,0) and the actual sound heard. The results are that
sound effects do not synchronize with visual effects. The delay occurs on
both Linux and Mac OS X, for various size WAV files. Has anyone else noticed
this delay?

Do you also have it in some games?

For example, I don’t have it in Njam (see my sig) on Linux. If you have
any game that uses SDL, try it, and read the sources to see what you’ve
done different.

HTH–
Milan Babuskov
http://njam.sourceforge.net

Hello !

What is the size of your Audio Buffer ?

CU> I’m getting a slight (~0.5 second ) delay between the call to

Mix_PlayChannel(-1,chunk,0) and the actual sound heard. The results are
that
sound effects do not synchronize with visual effects. The delay occurs on
both Linux and Mac OS X, for various size WAV files. Has anyone else
noticed
this delay?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

What is the size of your Audio Buffer ?

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

The hardware is modern, with heaps of RAM. So I don’t think that’s the
problem, either.

Hello !

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

The hardware is modern, with heaps of RAM. So I don’t think that’s the
problem, either.

Test if for example 2048 reduces the lag you noticed.

CU

And this is why I hate computers. :wink:

Sorry… pining for the old 8-bit computer days :wink:

-bill!On Tue, May 11, 2004 at 07:32:02PM +0200, Torsten Giebl wrote:

Hello !

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

The hardware is modern, with heaps of RAM. So I don’t think that’s the
problem, either.

Test if for example 2048 reduces the lag you noticed.

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

The hardware is modern, with heaps of RAM. So I don’t think
that’s the
problem, either.

Test if for example 2048 reduces the lag you noticed.

That does reduce the lag, thanks.