SDLMixer in Win32

Hi!

I have tried to use the SDLMixer under linux, solaris and win32. It
works fine with the first two but with win32 I am having some trouble.

The trouble is that the thread mixing the sound seems to be unable to
fill the mixingbuffer in time. I can hear the gaps when having a “too
small” mixing buffer (512 bytes). This small buffer is required to get
fast enough response time for the game I’m coding.

Does anyone else have the same kind of problem? Perhaps also a solution?

Or am I the only one experiencing this?

Greetings,
Thomas Sk?ldenborg

I’ve achieved good results with my pysol-sound-server by using
a buffer size of 1024 (22050 hz at 16 bit) and increasing the
audio thread priority to THREAD_PRIORITY_HIGH.

As there is no official way of doing this you must make some
changes to mixer.c.

See http://pysol.tsx.org for source code.

HTH,
MarkusOn 27-Jan-2000 Thomas Sk?ldenborg wrote:

Hi!

I have tried to use the SDLMixer under linux, solaris and win32. It
works fine with the first two but with win32 I am having some trouble.

The trouble is that the thread mixing the sound seems to be unable to
fill the mixingbuffer in time. I can hear the gaps when having a “too
small” mixing buffer (512 bytes). This small buffer is required to get
fast enough response time for the game I’m coding.

Does anyone else have the same kind of problem? Perhaps also a solution?

Or am I the only one experiencing this?

Greetings,
Thomas Sk?ldenborg

---- Markus F.X.J. Oberhumer <@Markus_F.X.J_Oberhum> ----
---- http://wildsau.idv.uni-linz.ac.at/mfx/ ----
---- 5E CB 5C 85 DE AF 9E BF E9 DA 7E 6A 39 F8 CC 67 ----

                         3 WARPS TO URANUS

I’ve achieved good results with my pysol-sound-server by using
a buffer size of 1024 (22050 hz at 16 bit) and increasing the
audio thread priority to THREAD_PRIORITY_HIGH.

As there is no official way of doing this you must make some
changes to mixer.c.

I don’t see any version of the mixer on your site.
You can change the buffer size easily using the existing API.

Changing the thread priority isn’t officially supported, as it requires
root priviliges on UNIX.

Hey Markus, thanks for the note in your README. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

I’ve achieved good results with my pysol-sound-server by using
a buffer size of 1024 (22050 hz at 16 bit) and increasing the
audio thread priority to THREAD_PRIORITY_HIGH.

As there is no official way of doing this you must make some
changes to mixer.c.

I don’t see any version of the mixer on your site.
You can change the buffer size easily using the existing API.

pysol-sound-server contains a modified SDL_mixer.

Changing the thread priority isn’t officially supported, as it requires
root priviliges on UNIX.

It seems not to be necessary under Linux, but it really helps
reducing avoiding ugly sound interruptions under Windows.

Hey Markus, thanks for the note in your README. :slight_smile:

You’re welcome :slight_smile:

Markus

---- Markus F.X.J. Oberhumer <@Markus_F.X.J_Oberhum> ----
---- http://wildsau.idv.uni-linz.ac.at/mfx/ ----
---- 5E CB 5C 85 DE AF 9E BF E9 DA 7E 6A 39 F8 CC 67 ----

                         3 WARPS TO URANUSOn 28-Jan-2000 Sam Lantinga wrote:

Changing the thread priority isn’t officially supported, as it requires
root priviliges on UNIX.

It seems not to be necessary under Linux, but it really helps
reducing avoiding ugly sound interruptions under Windows.

I will be working on the Win32 sound to take advantage of DirectX 6’s
audio event mechanism, so I would appreciate feedback as to whether that
helps.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

I’m still very unclear on how to build SDLMixer for Win32. Is this the same
CVS tagging confusion I had earlier. Is there a specific module I should be
snagging to play with this? If I just grab “mixer” from CVS there is no
obvious way to buidl it for Win32.

My goal is to be able to play music from an audio CD in the local drive or
an MP3 file and process the actual sound data to produce interesting
displays, etc. I can do most of this already using simple WAV files. The
key is knowing how to get the data in a raw form and also to know were you
are in the data as it is playing.

As you beat on the Win32 code, please let me know if you have anything like
this going.> -----Original Message-----

From: Sam Lantinga [SMTP:slouken at devolution.com]
Sent: Monday, January 31, 2000 9:21 AM
To: sdl at lokigames.com
Subject: Re: [SDL] SDLMixer in Win32

Changing the thread priority isn’t officially supported, as it
requires

root priviliges on UNIX.

It seems not to be necessary under Linux, but it really helps
reducing avoiding ugly sound interruptions under Windows.

I will be working on the Win32 sound to take advantage of DirectX 6’s
audio event mechanism, so I would appreciate feedback as to whether that
helps.

-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec