Mailing List Archive

dosbox 0.74.3 can't init SDL: No audio device on one machine
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.
Re: dosbox 0.74.3 can't init SDL: No audio device on one machine [ In reply to ]
On Thursday, 31 August 2023 19:51:20 BST Walter Dnes wrote:
> 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
Re: dosbox 0.74.3 can't init SDL: No audio device on one machine [ In reply to ]
On 2023-08-31, Walter Dnes wrote:

> 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?

> The directory /dev/snd is identical on both
> machines. Any ideas?

--
Nuno Silva
Re: [SOKVED] dosbox 0.74.3 can't init SDL: No audio device on one machine [ In reply to ]
On Thu, Aug 31, 2023 at 09:21:40PM +0100, Michael wrote
>
> Do both machines have alsa built the same way and working?

I don't know. From the looks of it, probably not.

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

CLI doesn't make a difference.

>
> 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.
Re: [SOLVED] Re: dosbox 0.74.3 can't init SDL: No audio device on one machine [ In reply to ]
On Thu, Aug 31, 2023 at 10:45:54PM +0100, Nuno Silva wrote
>
> 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.
Re: dosbox 0.74.3 can't init SDL: No audio device on one machine [ In reply to ]
On 31/08/2023 21:51, Walter Dnes wrote:
> 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.)