Mix_PlayChannel delay with Ubuntu 8.1

BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }I’m
using Mix_PlayChannel to playback ogg files (22050 16bit) in an app.
It worked perfectly on ubuntu 7.1 but in the latest version 8.1 there
is ~4/10 lag from when the command is issued and the sound is played.
I changed the buffer size which had no effect. I tried reverting to
sdl_mixer 1.2.6 and that had no effect. I’ve reloaded 7.1 and the
same binary plays fine. Any help would be appreciated.

I’m using Mix_PlayChannel to playback ogg files (22050 16bit) in an
app. It worked perfectly on ubuntu 7.1 but in the latest version
8.1 there is ~4/10 lag from when the command is issued and the sound
is played. I changed the buffer size which had no effect. I tried
reverting to sdl_mixer 1.2.6 and that had no effect. I’ve reloaded
7.1 and the same binary plays fine. Any help would be appreciated.

As far as I know, Ubuntu uses PulseAudio as a sound-server. If your
SDL application uses PulseAudio, such a lag seems not unusual to me.
Perhaps your app uses PulseAudio on 8.1 and uses OSS/ALSA on 7.1.

Try something like
SDL_AUDIODRIVER=alsa ./yourappAm 17.11.2008 um 17:35 schrieb chuck at source9.com:

BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }I
tried it and it had no effect. Any other ideas?
On Mon 08/11/17 10:07 , Albert Zeyer albert.zeyer at rwth-aachen.de
sent:
Am 17.11.2008 um 17:35 schrieb :

I’m using Mix_PlayChannel to playback ogg files (22050 16bit) in
an
app. It worked perfectly on ubuntu 7.1 but in the latest version

8.1 there is ~4/10 lag from when the command is issued and the
sound
is played. I changed the buffer size which had no effect. I
tried
reverting to sdl_mixer 1.2.6 and that had no effect. I’ve
reloaded
7.1 and the same binary plays fine. Any help would be
appreciated.
As far as I know, Ubuntu uses PulseAudio as a sound-server. If your

SDL application uses PulseAudio, such a lag seems not unusual to
me.
Perhaps your app uses PulseAudio on 8.1 and uses OSS/ALSA on 7.1.
Try something like
SDL_AUDIODRIVER=alsa ./yourapp

This is because PulseAudio takes the place of ALSA and OSS interfaces, so you get the same infuriating bugs regardless of your SDL_AUDIODRIVER choice.

Removing PulseAudio would probably solve this, but there may be other solutions.

PulseAudio is notorious for issues such as this, and it is depressing that it has become “standard” on some distributions.

chuck at source9.com wrote:> I tried it and it had no effect. Any other ideas?

On Mon 08/11/17 10:07 , Albert Zeyer albert.zeyer at rwth-aachen.de sent:

Am 17.11.2008 um 17:35 schrieb chuck at source9.com
<javascript:top.opencompose('chuck at source9.com','','','')>:

> I'm using Mix_PlayChannel to playback ogg files (22050 16bit) in an
> app. It worked perfectly on ubuntu 7.1 but in the latest version
> 8.1 there is ~4/10 lag from when the command is issued and the sound
> is played. I changed the buffer size which had no effect. I tried
> reverting to sdl_mixer 1.2.6 and that had no effect. I've reloaded
> 7.1 and the same binary plays fine. Any help would be appreciated.

As far as I know, Ubuntu uses PulseAudio as a sound-server. If your
SDL application uses PulseAudio, such a lag seems not unusual to me.
Perhaps your app uses PulseAudio on 8.1 and uses OSS/ALSA on 7.1.

Try something like
SDL_AUDIODRIVER=alsa ./yourapp


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130

PulseAudio emulates an ALSA device?

But even then, you should always be able to access the real ALSA
device directly.

Removing PulseAudio is not the best solution and I doubt that many
Ubuntu users would remove PulseAudio just to play a game. But anyway,
there should always be the possibility to access the real ALSA device
directly.Am 17.11.2008 um 20:58 schrieb Forest Hale:

This is because PulseAudio takes the place of ALSA and OSS
interfaces, so you get the same infuriating bugs regardless of your
SDL_AUDIODRIVER choice.

Removing PulseAudio would probably solve this, but there may be
other solutions.

PulseAudio is notorious for issues such as this, and it is
depressing that it has become “standard” on some distributions.

chuck at source9.com wrote:

I tried it and it had no effect. Any other ideas?

On Mon 08/11/17 10:07 , Albert Zeyer @Albert_Zeyer
sent:

Am 17.11.2008 um 17:35 schrieb chuck at source9.com
<javascript:top.opencompose(‘chuck at source9.com’,’’,’’,’’)>:

I’m using Mix_PlayChannel to playback ogg files (22050 16bit) in an
app. It worked perfectly on ubuntu 7.1 but in the latest version
8.1 there is ~4/10 lag from when the command is issued and the sound
is played. I changed the buffer size which had no effect. I tried
reverting to sdl_mixer 1.2.6 and that had no effect. I’ve reloaded
7.1 and the same binary plays fine. Any help would be appreciated.

As far as I know, Ubuntu uses PulseAudio as a sound-server. If
your
SDL application uses PulseAudio, such a lag seems not unusual to
me.
Perhaps your app uses PulseAudio on 8.1 and uses OSS/ALSA on 7.1.

Try something like
SDL_AUDIODRIVER=alsa ./yourapp



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130

Yes, it emulates an ALSA device, so that all libasound programs go through it, naturally it has different bugs than libasound does, so you can get some peculiar behavior depending on whether it’s
emulated or not.

I think it also emulates an OSS device.

Albert Zeyer wrote:> PulseAudio emulates an ALSA device?

But even then, you should always be able to access the real ALSA device
directly.

Removing PulseAudio is not the best solution and I doubt that many
Ubuntu users would remove PulseAudio just to play a game. But anyway,
there should always be the possibility to access the real ALSA device
directly.

Am 17.11.2008 um 20:58 schrieb Forest Hale:

This is because PulseAudio takes the place of ALSA and OSS interfaces,
so you get the same infuriating bugs regardless of your
SDL_AUDIODRIVER choice.

Removing PulseAudio would probably solve this, but there may be other
solutions.

PulseAudio is notorious for issues such as this, and it is depressing
that it has become “standard” on some distributions.

chuck at source9.com wrote:

I tried it and it had no effect. Any other ideas?

On Mon 08/11/17 10:07 , Albert Zeyer albert.zeyer at rwth-aachen.de sent:

Am 17.11.2008 um 17:35 schrieb chuck at source9.com
<javascript:top.opencompose(‘chuck at source9.com’,’’,’’,’’)>:

I’m using Mix_PlayChannel to playback ogg files (22050 16bit) in an
app. It worked perfectly on ubuntu 7.1 but in the latest version
8.1 there is ~4/10 lag from when the command is issued and the sound
is played. I changed the buffer size which had no effect. I tried
reverting to sdl_mixer 1.2.6 and that had no effect. I’ve reloaded
7.1 and the same binary plays fine. Any help would be appreciated.

As far as I know, Ubuntu uses PulseAudio as a sound-server. If your
SDL application uses PulseAudio, such a lag seems not unusual to me.
Perhaps your app uses PulseAudio on 8.1 and uses OSS/ALSA on 7.1.

Try something like
SDL_AUDIODRIVER=alsa ./yourapp



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Forest ‘LordHavoc’ Hale
Author of DarkPlaces Quake1 engine and mod
http://icculus.org/twilight/darkplaces/
Address: 94340 Horton Road Blachly OR 97412
Phone/Fax: 541-925-4130

By the way, there is a good way to know, run alsamixer. If you’re
running with pulseaudio, it’ll appear with only a single volume
control.

And yeah, pretty depressing to see that latency is increased, and we
lose the ability to mix in hw at the same time because of
pulseaudio…

StephaneOn Mon, Nov 17, 2008 at 20:58, Forest Hale wrote:

This is because PulseAudio takes the place of ALSA and OSS interfaces, so you get the same infuriating bugs regardless of your SDL_AUDIODRIVER choice.

Removing PulseAudio would probably solve this, but there may be other solutions.

PulseAudio is notorious for issues such as this, and it is depressing that it has become “standard” on some distributions.

BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Thanks for your help everyone. I found this thread:
http://ubuntuforums.org/showthread.php?t=885437
It seems that pulseaudio is causing a number of problems. I removed
it and the app works fine.
On Mon 08/11/17 13:50 , "Stephane Marchesin"
marchesin at icps.u-strasbg.fr sent:

This is because PulseAudio takes the place of ALSA and OSS
interfaces, so you get the same infuriating bugs regardless of your
SDL_AUDIODRIVER choice.

Removing PulseAudio would probably solve this, but there may be
other solutions.

PulseAudio is notorious for issues such as this, and it is
depressing that it has become “standard” on some distributions.

By the way, there is a good way to know, run alsamixer. If you’re
running with pulseaudio, it’ll appear with only a single volume
control.
And yeah, pretty depressing to see that latency is increased, and we
lose the ability to mix in hw at the same time because of
pulseaudio…
StephaneOn Mon, Nov 17, 2008 at 20:58, Forest Hale wrote:


SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org