I am having problems with SDL_mixer as I probably guess a lot of other
people do as well. Here is what I have:
Mix_OpenAudio(44100, AUDIO_S16SYS, 1, 4096);
This opens a mono channel with 4096 bytes of buffer size. If I use anything below 4096, the sound immediatelly gets choppy (jitter?) for
lack of a better word, and it’s unusable. With 4096 bytes the sound
plays fine, but the latency is way too high (almost half a second).
I guess this is one of the most asked questions here on the mailing
list, but I couldn’t search the mailing list archives because there’s no
function for it, and I didn’t find anything useful on google either. So
how does one remedy this?
We had same problem with directsound.
Still didn’t fixed - using waveout audio driver - it working but have
terrible latency up to 0.5s =(
Alex
2005/12/13, David K :>
I am having problems with SDL_mixer as I probably guess a lot of other
people do as well. Here is what I have:
Mix_OpenAudio(44100, AUDIO_S16SYS, 1, 4096);
This opens a mono channel with 4096 bytes of buffer size. If I use anything below 4096, the sound immediatelly gets choppy (jitter?) for
lack of a better word, and it’s unusable. With 4096 bytes the sound
plays fine, but the latency is way too high (almost half a second).
I guess this is one of the most asked questions here on the mailing
list, but I couldn’t search the mailing list archives because there’s no
function for it, and I didn’t find anything useful on google either. So
how does one remedy this?
David K wrote:> I am having problems with SDL_mixer as I probably guess a lot of other
people do as well. Here is what I have:
Mix_OpenAudio(44100, AUDIO_S16SYS, 1, 4096);
This opens a mono channel with 4096 bytes of buffer size. If I use anything below 4096, the sound immediatelly gets choppy (jitter?)
for lack of a better word, and it’s unusable. With 4096 bytes the
sound plays fine, but the latency is way too high (almost half a second).
I guess this is one of the most asked questions here on the mailing
list, but I couldn’t search the mailing list archives because there’s
no function for it, and I didn’t find anything useful on google
either. So how does one remedy this?
I am having problems with SDL_mixer as I probably guess a lot of other
people do as well. Here is what I have:
Mix_OpenAudio(44100, AUDIO_S16SYS, 1, 4096);
This opens a mono channel with 4096 bytes of buffer size. If I use anything below 4096, the sound immediatelly gets choppy (jitter?)
for lack of a better word, and it’s unusable. With 4096 bytes the
sound plays fine, but the latency is way too high (almost half a
second).
I guess this is one of the most asked questions here on the mailing
list, but I couldn’t search the mailing list archives because there’s
no function for it, and I didn’t find anything useful on google
either. So how does one remedy this?
If you’re using ALSA on a Linux box, the driver defaults seem to be way
too high for real-time audio (but probably fine for the cute little
dings that KDE and Gnome make)
Adding something like this to ~/.asoundrc may help:
period_size 1024
buffer_size 4096
(feel free to adjust those values.)
This seemed to help the SDL audio code in Quake 3 with ALSA.