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 :(
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.
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
But playing a midi using the port did not work :(
Installing timidity and running the server
Changing midiconfig to 129:0 in dosbox.conf
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
The following solution found on the net is somewhat old but since the problem is the same it might still be valid.
Quote:
Source: http://www.herikstad.net/2009/04/dosbox-and-ubuntu-904-jaunty.html
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:
(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
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.