VOGONS

Common searches


First post, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

Recently I have been doing experiments with DOSBox audio output levels and found that dosbox actually boosts the audio signal and clips at its output.
Long story short, I needed to set "mixer master 60" to completely eliminate clipping while some games still reach -0.5dbFS (as I read the signal in my DAW), they do not clip.

To test this simply run Doom, full SFX volume, idkfa, choose weapon 6, and shoot straight into space, and look at the DAW sound level meters.
This creates a very loud sound which clips the audio output and reaches 0.0dbFS (digital) if Master set above 60.
I also created a WAV test file with distorted pink noise to create the loudest sound possible and I had to turn DOSBox mixer master to 60 to prevent clipping at dosbox output.

Moreover, I tested this with my retro PC and found that the sound card (Yamaha YMF719) has plenty of headroom and does not distort like DOSBox.

Dosbox Devs;
Is there a reason the output of dosbox is clipping when mixer master = 100 (default)?
I am willing to provide more info, collaboration and audio test files to solve this minor "bug" which results in less that ideal sound output.
The default mixer master 100, is obviously distorting the sound because there is no headroom left, real sound card in DOS has plenty of headroom before clipping.
Setting anything above master 60 will distort the output.

Mixer Master 60 Doom, -1.17dbFS before clipping:

Mixer Master 60.png
Filename
Mixer Master 60.png
File size
248.68 KiB
Views
1810 views
File license
Fair use/fair dealing exception

Mixer Master 60 Noise, -0.7dbFS before clipping

Mixer Master 60 Noise.png
Filename
Mixer Master 60 Noise.png
File size
173.04 KiB
Views
1810 views
File license
Fair use/fair dealing exception

Mixer Master 70 Doom and Noise, -0.1dbFS (clipping):

Mixer Master 70.png
Filename
Mixer Master 70.png
File size
250.26 KiB
Views
1810 views
File license
Fair use/fair dealing exception
Mixer Master 70 Noise.png
Filename
Mixer Master 70 Noise.png
File size
172.84 KiB
Views
1810 views
File license
Fair use/fair dealing exception


my important / useful posts are here

Reply 1 of 3, by Deep Thought

User metadata
Rank Newbie
Rank
Newbie

Since we're dealing with compressed audio sources most of the time, I like to keep 3-6 dB of headroom on playback with a sample-based peak meter to avoid inter-sample clipping.
-0.5 dBFS is still going to be clipping on conversion to analog audio unless your DAC has some internal headroom to prevent inter-sample clipping.

I do wonder how much of this is a DOSBox issue and how much is DOOM - or even a more generalized issue though.
In ZDOOM, I have to lower the in-game audio to 20% to avoid clipping in the loudest scenario that I could create (plasma gun firing at a wall with other sound effects playing) and even then it's reaching peaks of -1.3 dBTP! (with a true peak meter, anything below -1.0dBTP is fine)

Outside of DOSBox and even old games, I have to keep my X-Fi Titanium to about 30% volume when downmixing 5.1 content to 2.0 for headphone use with CMSS-3D to ensure that it can't clip.

And then you have to worry about where it's best to handle the volume control.
Most games or emulators don't have an ideal audio engine that uses 64-bit math and properly dithers the output, so you don't really want to be adjusting the volume there if you can help it...

Reply 2 of 3, by James-F

User metadata
Rank Oldbie
Rank
Oldbie

I think DOSBox has a very good sound blaster emulation but the output volume is just to loud in comparison to a real sound card.
For now, it's just people with the right equipment (Studio Monitors, DAWs, etc..) who can actually monitor/see and hear the difference.
I would strongly suggest setting DOSBox to mixer master 60 or even 50 for maximum quality (mine is on 40 to match SC-VA).
This is not the same as attenuating with windows mixer because the audio is already distorted out of dosbox and you simply lower the already distorted sound with windows mixer.

I wanted to make sure DOSBox Dev's actually aware of that and may want to fix that in the future by setting 50 as default, and allowing the user to boost later if they want.
DOSBox is too loud anyway in relation to modern games.

OOT:
I do the same when downmixing surround to stereo, the stereo mix never clips even if all surround channels play at -0.1dbTP (excluding LFE), but that makes a very quiet mix.
LAV Audio Decoder does that automatically in MPC-HC (if you use that).


my important / useful posts are here