SDL_mixer delay

Hello, There:
I’m compiling a game on Windows 98 SE, with mingw, using
SDL-1.2.11 and SDL_mixer-1.2.7.

  On the first try I compiled SDL and SDL_mixer myself with the 

usual procedure "./configure && make && make install"
When I ran the game I got a delay (from 0.5 second to 1 second)
between the action and the moment when the corresponding sound was heard.

  The second try was to use the precompiled sdl.dll for mingw, 

available at www.libsdl.org. That seems to have fixed the problem. But,
why?
?What can have made the precompiled build different from mine? ?So
different as to make the sound work?
I’m playing sounds in ogg format, just in case you need to know.

Thanks.
Facundo Dominguez

Hola Facundo,

When I ran the game I got a delay (from 0.5 second to 1 second)
between the action and the moment when the corresponding sound was heard.

Delays in SDL_mixer are usually caused by the fact that the mixer buffer
is a FIFO, you push data on one end and it comes out from the other end
to the soundcard. The bigger this buffer, the higher delay you have
between putting data and hearing it. The size of this buffer is
controlled by a parameter when you open the mixer.

Why this problem manifests when you use your version but not the
precompiled version baffles me, however. It may be caused by something
entirely different.

Good luck,

--Gabriel________________________________________________________________________

Gabriel Gambetta
Mystery Studio - http://www.mysterystudio.com
Gabriel on Graphics - http://gabrielongraphics.blogspot.com

Hello, There:
I’m compiling a game on Windows 98 SE, with mingw, using
SDL-1.2.11 and SDL_mixer-1.2.7.

On the first try I compiled SDL and SDL_mixer myself with the

usual procedure "./configure && make && make install"
When I ran the game I got a delay (from 0.5 second to 1 second)
between the action and the moment when the corresponding sound was heard.

The second try was to use the precompiled sdl.dll for mingw,

available at www.libsdl.org. That seems to have fixed the problem. But,
why?

The precompiled lib is built with visual studio. There’s a sound bug
in the mingw build and no-one seems to know why.

?What can have made the precompiled build different from mine? ?So

different as to make the sound work?

Nobody knows. If the code’s the same then it’s either a bug in mingw
or a misconfiguration problem, however unlike visual studio mingw
doesn’t have whole lot of flags to get wrong.

RF.From: fdomin@fing.edu.uy (Facundo Dominguez)

?What can have made the precompiled build different from mine? ?So

different as to make the sound work?

It’s likely that your SDL doesn’t have DirectSound support.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

?What can have made the precompiled build different from mine? ?So
different as to make the sound work?

It’s likely that your SDL doesn’t have DirectSound support.

If there is a known bug with SDL_mixer compiled with MinGW,
is this DirectSound and/or WaveOut ?

Maybe try compiling SDL_mixer with MinGW and the latest DirectX
SDK which works great with MinGW after renaming the .lib files to
lib
.a ones.

CU