No SDL audio under Linux

Hi,

I have a little program playing a wave file. Under Win32 it works but under
Linux I become:

cout << SDL_GetError() << endl; -> No available audio device

if I call it directly after SDL_Init(SDL_INIT_AUDIO).

Sound is working fine under Linux. I’m using the alsa drivers. So my
question is what can I do to get sound working. Do I need a special device
in /dev so I can make a symlink or something like this?

I’m running Slackware 8, Kernel 2.4.18 and alsa-0.5.12a.

Steinchen–
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial

Try setting an environment variable called SDL_DSP_NOSELECT to “1”.

Sebastian Stein wrote:> Hi,

I have a little program playing a wave file. Under Win32 it works but under
Linux I become:

cout << SDL_GetError() << endl; -> No available audio device

if I call it directly after SDL_Init(SDL_INIT_AUDIO).

Sound is working fine under Linux. I’m using the alsa drivers. So my
question is what can I do to get sound working. Do I need a special device
in /dev so I can make a symlink or something like this?

I’m running Slackware 8, Kernel 2.4.18 and alsa-0.5.12a.

Steinchen

Stanley E Brown <stanley.brown at zimmer.com> [020807 19:53]:

Try setting an environment variable called SDL_DSP_NOSELECT to “1”.

Yes, this worked.

Thanks,

Steinchen–
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial

Sebastian Stein wrote:

cout << SDL_GetError() << endl; -> No available audio device

if I call it directly after SDL_Init(SDL_INIT_AUDIO).

Sound is working fine under Linux. I’m using the alsa drivers. So my

Try setting SDL_AUDIODRIVER to “alsa”.

In bash:
export SDL_AUDIODRIVER=“alsa”

then execute your app.

mfg

Claudio