8

I try to run a game under dosbox, but it has no sound, and in the terminal dosbox says:

MIXER:Can't open audio: No available audio device , running in nosound mode.
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none

Update

I changed the ports to 128:0 in the dosbox config file and now it says

ALSA:Client initialised [128:0]
MIDI:Opened device:alsa

but still no sound :(

1
  • 2
    What made you put in the ports to [128:0]? Is this a magic number from somewhere or specific to your system? Nov 4, 2016 at 6:19

5 Answers 5

5

Turns out the sounds of the game were muted from the game's own options menu. Changing the MIDI port to 128:0 was still needed though, to enable dosbox's sound.

0
4

I tried to play The Lost Vikings using dosbox and got no sound (NB: Using NixOS, not Ubuntu)

My system listed port 14 as midi

$ pmidi -l
 Port     Client name                       Port name
 14:0     Midi Through                      Midi Through Port-0

But playing a midi using the port did not work :(

$ wget http://www.angelfire.com/fl/herky/images/teddybear.mid
$ pmidi -p 14:0 teddybear.mid
<silence>

Installing timidity and running the server

$ timidity -iA
...

$ pmidi -l
 Port     Client name                       Port name
 14:0     Midi Through                      Midi Through Port-0
129:0     TiMidity                          TiMidity port 0
129:1     TiMidity                          TiMidity port 1
129:2     TiMidity                          TiMidity port 2
129:3     TiMidity                          TiMidity port 3

$ pmidi -p 14:0 teddybear.mid
<sound playing>

Changing midiconfig to 129:0 in dosbox.conf

[midi]
mpu401=intelligent
mididevice=default
midiconfig=129:0

Running the game and we have sound!

Note:to nixos users - I enabled sound.enable=true; but I haven't tested if it was necessary

2
  • 1
    Worked for my case too (Debian 10, Dosbox 0.74-2). Thanks for the thorough explanation!
    – Alberto M
    May 12, 2020 at 21:32
  • Thanks. Just up The Lost Vikings for my 6yo on NixOS
    – Karl
    Aug 8, 2023 at 0:13
2

The following solution found on the net is somewhat old but since the problem is the same it might still be valid.

Quote:

You need to tell SDL (which is what DOSBox is built on) to use PulseAudio, type export SDL_AUDIODRIVER=pulse in a console window, then start DOSBox from the same window by typing dosbox.

Source: http://www.herikstad.net/2009/04/dosbox-and-ubuntu-904-jaunty.html

1

Solution to the sound problem: if you still have problems getting the sound to work on dosbox 0.74 or any other version, first of all do the things the comments above states, and do them from scratch, I mean everything from directory to installation. And last CHANGE THE SOUND IN GAME FROM DOSBOX, usually theres a "setsound,exe" file or similar, access it:

c mount /home/yourname/yourdosfolder
c:
cd yourgame
yourgame
setsound.exe

(ALWAYS START DOSBOX FROM TERMINAL)

Listen folks, I recently installed Ubuntu 11.04, hence first time ever using Linux, after a week of crashes and bugs, and so on, I finally got it working fine, and I'm loving it, it was all worthwhile for the cause - open source. And now It's all exlusive on my laptop, but man I tell you it was difficult installing and running ubuntu as the only OS, I do not recommend such attempts, but if you have several pc's around then by all mean D

1
  • 3
    This does not really answer the question as it stands. It would be more useful if you include the steps from the comments as they should be carried out.
    – RolandiXor
    Sep 25, 2012 at 19:22
1

I find that before running some programs on Ubuntu 18.04, I need to open the sound settings and choose the correct output device.

Ubuntu never remembers my selection between reboots (always defaulting to "Digital Output AT2020USB" (the audio monitor on my mic!) and I have to manually choose "Line Out".

However, it's as if it remembers the setting per program, so that next time I run the program, it will actually work correctly without me taking any extra steps as above.

This applied to DosBox too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .