Discussion:
[gentoo-user] dosbox 0.74.3 can't init SDL: No audio device on one machine
(too old to reply)
Walter Dnes
2023-08-31 19:00:01 UTC
Permalink
This is the most frustrating type of problem. On one machine I can
run dosbox fine. On a second machine...

[waltdnes][~] /usr/bin/dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL No available audio device

The regular user (waltdnes) is a member of the audio group on both
machines. The files in ~/.dosbox are identical, and "emerge -pv dosbox"
spits out identical output. The directory /dev/snd is identical on both
machines. Any ideas?
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Michael
2023-08-31 20:30:01 UTC
Permalink
Post by Walter Dnes
This is the most frustrating type of problem. On one machine I can
run dosbox fine. On a second machine...
[waltdnes][~] /usr/bin/dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL No available audio device
The regular user (waltdnes) is a member of the audio group on both
machines. The files in ~/.dosbox are identical, and "emerge -pv dosbox"
spits out identical output. The directory /dev/snd is identical on both
machines. Any ideas?
Do both machines have alsa built the same way and working?

Does it work without error if you specify it on the CLI?

SDL_AUDIODRIVER=alsa /usr/bin/dosbox
Walter Dnes
2023-08-31 22:40:02 UTC
Permalink
Post by Michael
Do both machines have alsa built the same way and working?
I don't know. From the looks of it, probably not.
Post by Michael
Does it work without error if you specify it on the CLI?
CLI doesn't make a difference.
Post by Michael
SDL_AUDIODRIVER=alsa /usr/bin/dosbox
That changes the error message...

[waltdnes][~] SDL_AUDIODRIVER=alsa /usr/bin/dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL Audio target 'alsa' not available

Later... that very same evening...

After some spelunking I noticed that I had libsdl and libsdl2 flagged
with "-alsa" in package.use on the non-working machine (don't know why),
and "alsa" on the working machine. Changing the flags to "alsa" and
updating world with "--changed-use" fixed things on the non-working
machine. Thanks for everybody's help.
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Nuno Silva
2023-08-31 21:50:01 UTC
Permalink
Post by Walter Dnes
This is the most frustrating type of problem. On one machine I can
run dosbox fine. On a second machine...
[waltdnes][~] /usr/bin/dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL No available audio device
The regular user (waltdnes) is a member of the audio group on both
machines. The files in ~/.dosbox are identical, and "emerge -pv dosbox"
spits out identical output.
What about sdl-related packages, same flags and versions there too?
Post by Walter Dnes
The directory /dev/snd is identical on both
machines. Any ideas?
--
Nuno Silva
Walter Dnes
2023-08-31 22:50:01 UTC
Permalink
Post by Nuno Silva
What about sdl-related packages, same flags and versions there too?
Turns out that I had libsdl and libsdl2 flagged "-alsa" in package.use
on the non-working machine (don't know why). Flipping the flags to
"alsa", and then re-emerging, solved the problem.
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Nikos Chantziaras
2023-09-01 12:00:02 UTC
Permalink
Post by Walter Dnes
This is the most frustrating type of problem. On one machine I can
run dosbox fine. On a second machine...
[waltdnes][~] /usr/bin/dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL No available audio device
These days I recommend games-emulation/dosbox-staging instead.(It's a
fork of dosbox, *not* a staging area for dosbox. The name is rather
unfortunate.)

Loading...