The Wombelix Post - Audiohttps://dominik.wombacher.cc/2019-12-06T18:53:00+01:00No Sound in DOSBox on Linux2019-12-06T18:53:00+01:002019-12-06T18:53:00+01:00Dominik Wombachertag:dominik.wombacher.cc,2019-12-06:/posts/no-sound-in-dosbox-on-linux.html<!-- SPDX-FileCopyrightText: 2023 Dominik Wombacher <dominik@wombacher.cc> -->
<!-- -->
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
<p>I installed DOSBox to play some old DOS Games like Discworld on Linux (openSUSE Tumbleweed) but didn't had sound prior figure out the correct MIDI Port and adjusting the dosbox ... <a class="read-more" href="/posts/no-sound-in-dosbox-on-linux.html"> [read more]</a></p><!-- SPDX-FileCopyrightText: 2023 Dominik Wombacher <dominik@wombacher.cc> -->
<!-- -->
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
<p>I installed DOSBox to play some old DOS Games like Discworld on Linux (openSUSE Tumbleweed) but didn't had sound prior figure out the correct MIDI Port and adjusting the dosbox config accordingly.</p>
<p>Due to the fact that i installed Unreal Tournament from 1999 already (successful!) on my Linux Notebook, it's obvious that i had to do the same with some even older Games too :D</p>
<p>I thought executing "pmidi -l" would show the correct MIDI Port, but at least in my case, further steps were necessary.</p>
<p>The troubleshooting approach described in the <a class="reference external" href="https://askubuntu.com/questions/79944/dosbox-has-no-sound">AskUbuntu Forum</a>
(Archive: <a class="reference external" href="https://web.archive.org/web/20180102021001/https://askubuntu.com/questions/79944/dosbox-has-no-sound">[1]</a>,
<a class="reference external" href="http://archive.today/2021.02.25-232132/https://askubuntu.com/questions/79944/dosbox-has-no-sound">[2]</a>)
is my favorite and did the trick.</p>
<p>You have to Download a test MIDI File, start a MIDI Server, start the playback and if you have audio, put the correct Port into your dosbox config.</p>
<pre class="code text literal-block">
zypper install timidity
zypper install pmidi
cd /tmp
wget http://www.angelfire.com/fl/herky/images/teddybear.mid
pmidi -l
# Port Client name Port name
# 14:0 Midi Through Midi Through Port-0
timidity -iA
# Requested buffer size 32768, fragment size 8192
# ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
# TiMidity starting in ALSA server mode
# Opening sequencer port: 128:0 128:1 128:2 128:3
pmidi -p 128:0 teddybear.mid
</pre>
<p>In my case, pmidi identified Port "14:0" but based on the test with timidity i have to use "128:0" instead.</p>
<p>So i changed the corresponding parameter in my dosbox config:</p>
<pre class="code ini literal-block">
<span class="pygments-k">[midi]</span><span class="pygments-w">
</span><span class="pygments-na">midiconfig</span><span class="pygments-o">=</span><span class="pygments-s">128:0</span><span class="pygments-w">
</span>
</pre>
<p>When you start dosbox from the console, you should see something like the following an hear the nicest MIDI sound when starting an old Game ;)</p>
<pre class="code text literal-block">
ALSA:Client initialised [128:0]
MIDI:Opened device:alsa
</pre>
<p>I will play around with ScummVM as well within the next days, so i'm quite sure further Posts regarding some sort of gaming on Linux will follow soon!</p>