Home > English, Linux & Programming > Solving Sound Problems with Dosbox in Ubuntu 8.10 and 9.04

Solving Sound Problems with Dosbox in Ubuntu 8.10 and 9.04

Hey guys, since I get a lot of hits to this article, I’d really appreciate if you leave a short note when this helped you, so we can see if this is a general configuration problem. Thanks!

Since ubuntu 8.10 I was having stuttering sound with dosbox. I just made a fresh install of 9.04 and still was experiencing such problems (pulseaudio ftw again…). I searched the web, alas was unable to find a solution that was actually working. After trying a couple of things, I finally seem to have found a solution which is working (at least for me): I set the mixing rate within dosbox to match that of pulseaudio. To make it short, change your conf in ~/.dosbox/ to

[mixer]
#   nosound: Enable silent mode, sound is still emulated though.
#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.
#            Possible values: 22050, 44100, 48000, 32000, 16000, 11025, 8000, 49716.
# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.
#            Possible values: 2048, 4096, 8192, 1024, 512, 256.
# prebuffer: How many milliseconds of data to keep on top of the blocksize.
nosound=false
#rate=22050
rate=44100      # Change this line
blocksize=2048
prebuffer=10

Also, to get rid of the initial midi warning I changed the following, though it may not be necessary:

[midi]
#     mpu401: Type of MPU-401 to emulate.
#             Possible values: intelligent, uart, none.
# mididevice: Device that will receive the MIDI data from MPU-401.
#             Possible values: default, win32, alsa, oss, coreaudio, coremidi, none.
# midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use. See README for details.
mpu401=intelligent
mididevice=default
midiconfig=128:0      # Change this line

Yet another pulseaudio problem solved.

Update: Also, setting output to opengl helps a lot, at least if you have compiz enabled.

  1. No comments yet.
  1. No trackbacks yet.

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.