First post, by jrial
I am having issues getting sound to work in DOSBox. Sound sometimes plays, but when it does, it's intermittent. It will play for half a second, then nothing for a while, then perhaps a second, or a quarter of a second. Etc...
I've already played with the settings. I solved the Midi issue (use the correct port), but the issue is not Midi related, so that resolved nothing.
Currently, my settings look like this:
[sdl]
fullscreen=true
fulldouble=false
fullresolution=original
windowresolution=original
output=opengl
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper.txt
usescancodes=true
[dosbox]
language=
machine=svga_s3
captures=capture
memsize=16
[render]
frameskip=0
aspect=false
scaler=normal2x
[cpu]
core=auto
cycles=auto
cycleup=1000
cycledown=1000
[mixer]
nosound=false
rate=44100
blocksize=1024
prebuffer=80
[midi]
mpu401=intelligent
device=default
midiconfig=14:0
[sblaster]
sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=44100
[gus]
gus=false
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND
[speaker]
pcspeaker=false
pcrate=22050
tandy=auto
tandyrate=22050
disney=false
[joystick]
joysticktype=4axis
timed=false
autofire=false
swap34=false
buttonwrap=true
[serial]
serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled
[dos]
xms=true
ems=true
umb=true
keyboardlayout=none
There's a second config file that reads as such:
[glide]
glide=false
[ipx]
ipx=false
[autoexec]
@echo off
cls
mount C "./S2"
imgmount d "./S2/GAME.DAT" -t iso
c:
cls
s2.bat
cls
exit
This comes from the game Screamer 2 (Steam version), but the intermittent sound has occurred in other DOSBox games as well, also GOG versions, so I'm posting this in the general forum.
System info:
I'm running Linux Mint. The issues have persisted over various versions of Mint on this machine.
Kernel version: 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The audio is piped over the HDMI output of my videocard, a GeForce GTX 750 Ti
Audio server is Pulseaudio, using Alsa
When starting this particular game, my output is:
Starting DOSBox
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file ./dosbox_screamer2.conf
CONFIG:Loading additional settings from config file ./dosbox_screamer2_single.conf
MIXER:Got different values from SDL: freq 44100, blocksize 512
ALSA:Client initialised [14:0]
MIDI:Opened device:alsa
DOSBox switched to max cycles, because of the setting: cycles=auto. If the game runs too fast try a fixed cycles amount in DOSBox's options.
Done.
I always get the MIXER warning: regardless of what I set for blocksize, the DOSBox mixer always gets half that from SDL. Not sure what's going on there. I even tried commenting the blocksize and prebuffer out, and it appears to default to 1024 for blocksize, because I get the warning for 512 in that case.
I also tried manually setting the clockspeed, tried everything between 80.000 to 200.000 cycles/millisecond, and some appeared to work better than others, but none worked fine. It's also very inconsistent: when setting to auto, sometimes I get the intermittent sound, sometimes no sound at all, so "some appeared to work better than others" may be just a roll of the dice.
If more info is needed, let me know.