Skip to content

🔥🔥🔥 You are viewing a development version of the website. Things will blow up. 🔥🔥🔥

Regular users, please follow the exit signs.

# DOSBox mixer

The DOSBox mixer combines the output of all emulated sound devices into a final stereo signal. Each device gets its own mixer channel, and you can adjust volume, stereo panning, reverb, chorus, and crossfeed levels independently per channel.

The mixer uses a 32-bit floating-point processing path internally, so individual channels cannot be overloaded into clipping by high per-channel volume settings. A fixed 20 Hz high-pass filter on the master output removes DC offset and subsonic rumble. An auto-levelling compressor on the master channel prevents clipping of the final output.

The default master volume is 50% (-6 dB) to avoid audible distortion in games with loud output. You can raise it per game as needed (e.g., `MIXER MASTER 100`), but it’s better to boost only the channels that are too quiet (e.g., `MIXER SB 200`).

The mixer runs in its own dedicated thread, which greatly reduces and often completely eliminates audio stuttering and glitches. This is especially noticeable with the Roland MT-32, FluidSynth, OPL synth, and Red Book CD Audio.

## The MIXER command

To manage all these mixer channels, DOSBox provides the handy `MIXER` command that you can use from the DOS command line. If you run `MIXER` without any arguments, it prints out the current state of the mixer. This is what we get with the default configuration:

As we can see, we have four channels enabled by default:

- MASTER – This is the final summed stereo output of all other mixer channels. The MASTER channel is always enabled, always comes first, and is always stereo.

- OPL – Output of the Yamaha OPL FM synthesizer (usually part of an emulated Sound Blaster card, or a standalone AdLib Music Synthesizer Card). Can be mono or stereo, depending on the emulated FM synthesizer.

- PCSPEAKER – Mono output of the ubiquitous small loudspeaker built into most old IBM PC compatibles.

- SB – Digital audio output of the emulated Sound Blaster card. Can be mono or stereo, depending on the emulated model.

There is an important thing to note here: some emulated sound devices contain multiple sub-devices, each having their own mixer channel. The Sound Blaster 16 is such a device; its digital output is routed to the SB channel, while the output of the onboard Yamaha OPL3 synthesiser chip has its dedicated OPL channel.

This is actually similar to how the Sound Blaster software mixer works on later Sound Blaster cards. The `MIXER` command extends this concept so you can adjust the parameters of all emulated audio devices via a unified interface.

If you can’t remember all this, don’t worry — just run `MIXER /?` to display a handy little summary all available options.

## Changing channel settings

### Volume

Set the volume of a channel as a percentage:

    MIXER OPL 150

This sets the OPL channel to 150% volume. You can set the left and right channels independently by separating the values with a colon:

    MIXER OPL 200:100

### Reverb and chorus

Set the reverb and chorus levels of a channel with `R` and `C` followed by the level:

    MIXER OPL R50 C30

This sets the OPL channel’s reverb level to 50 and chorus level to 30. For details on the available presets and what reverb and chorus do, see Mixer effects.

### Crossfeed

Set the crossfeed strength of a channel with `X` followed by the level:

    MIXER OPL X50

For details on what crossfeed does and the available presets, see Mixer effects — Crossfeed.

### Reverse stereo

Swap the left and right channels of a stereo mixer channel:

    MIXER SB REVERSE

Some Sound Blaster models — particularly the Sound Blaster Pro — had the left and right digital audio channels reversed compared to later cards. Games developed and tested on these cards may have their stereo image flipped when emulating a different Sound Blaster model (typically the default Sound Blaster 16).

If sound effects in a game seem to come from the wrong direction (e.g., an enemy on the left of the screen produces sound from the right speaker), try reversing the SB channel. This only affects the specified channel’s output; other channels (like OPL) have their own independent stereo field.

### Advanced usage

You may change the settings of more than one channel in a single command. For example, the command `MIXER x30 opl 150 r50 c30 sb x10 reverse` accomplishes the following:

- Set the global crossfeed to 30 (`x30`)

- Set the volume of the OPL channel to 150%, the reverb level to 50, and the chorus level to 30 (`opl 150 r50 c30`)

- Set the crossfeed of the SB channel to 10 and use reverse stereo (`sb x10 reverse`)

## List of mixer channels

The below table lists all possible mixer channels with links to the respective sections of the manual where they’re described in detail.

Channel name | Device | Stereo?
--- | --- | ---
CDAUDIO | CD-DA digital audio | Yes
CMS | Creative Music System (C/MS) synthesiser | Yes
COVOX | Covox Speech Thing digital audio | No
DISNEY | Disney Sound Source (DSS) digital audio | No
DISKNOISE | Disk noise emulation | No
FSYNTH | FluidSynth MIDI synthesiser | Yes
GUS | Gravis UltraSound digital audio | Yes
IMFC | IBM Music Feature Card | Yes
MASTER | Master output channel | Yes
INNOVATION | Innovation SSI-2001 synthesiser | No
MT32 | Roland MT-32 MIDI synthesiser | Yes
OPL | Yamaha OPL synthesiser | Yes1
PCSPEAKER | PC speaker | No
PS1 | IBM PS/1 Audio synthesiser | No
PS1DAC | IBM PS/1 Audio digital audio | No
REELMAGIC | ReelMagic MPEG audio | Yes
SB | Sound Blaster digital audio | Yes1
SOUNDCANVAS | Roland Sound Canvas synthesiser | Yes
STON1 | Stereo-on-1 digital audio | Yes
TANDY | Tandy 1000 synthesiser | No
TANDYDAC | Tandy 1000 digital audio | No

## Denoiser

The OPL synth and the original SC-55 mk1 Sound Canvas models produce very low-level residual noise as part of their faithful hardware emulation. This noise is authentic — real hardware behaved the same way — but it can be slightly annoying on good-quality headphones or in quiet passages.

The `denoiser` (technically a noise gate) removes this residual noise without degrading the useful audio signal in any way. It is enabled by default.

The Sound Canvas noise affects all games on mk1 models. The OPL noise is only triggered by some games.

Games having the OPL residual noise issue

- Beneath a Steel Sky — audible constant noise during the intro
- Doom — chord-like noise at the start of the E2M2 level music
- Frederik Pohl’s Gateway / Gateway II: Homeworld — hanging note after exiting to DOS
- Gods — audible noise in-game between the quiet sound effects
- Tetris Classic (1992) — buzzing noise after each level’s intro music has finished playing
- Wizardry 6: Bane of the Cosmic Forge — hanging notes after sound effects

## Minimising audio glitches

Even after setting the optimal cpu_cycles value, you may hear occasional clicks or pops. This depends on your particular hardware, audio driver, and operating system combination.

Increasing the audio buffer sizes usually helps. The trade-off is higher audio latency (a longer delay between an action and its sound). The default `blocksize` is 1024 on Windows and 512 on macOS and Linux (in sample frames). The default `prebuffer` is 25 ms on Windows and 20 ms on the other platforms.

Try doubling both values as a starting point:

    [mixer]
    blocksize = 2048
    prebuffer = 50

The `blocksize` should be a power of two: 256, 512, 1024, 2048, 4096, or 8192. The `prebuffer` can be any value in milliseconds. Increase further if glitches persist, but keep in mind that larger buffers mean more noticeable input-to-sound delay.

Also make sure your cpu_cycles isn’t set higher than the game actually needs — overdoing it wastes host CPU resources that could otherwise go towards glitch-free audio emulation.

## Configuration settings

Mixer settings are to be configured in the `[mixer]` section. For effects settings (crossfeed, reverb, chorus), see Mixer effects.

##### nosound

  Enable silent mode (`off` by default). Sound is still emulated in silent mode, but DOSBox outputs no sound to the host. Capturing the emulated audio output to a WAV file works in silent mode.

  Possible values: `on`, `off` default

##### rate

  Sample rate of DOSBox’s internal audio mixer in Hz (`48000` by default). Valid range is 8000 to 96000 Hz. The vast majority of consumer-grade audio hardware uses a native rate of 48000 Hz.

  Note

  The OS will most likely resample non-standard sample rates to 48000 Hz anyway. Recommend leaving this as-is unless you have good reason to change it.

##### blocksize

  Block size of the host audio device in sample frames (`1024` on Windows, `512` on other platforms by default). Valid range is 64 to 8192. Should be set to power-of-two values (e.g., 256, 512, 1024). Larger values might help with sound stuttering but will introduce more latency. Also see negotiate.

##### prebuffer

  How many milliseconds of sound to render in advance on top of blocksize (`25` on Windows, `20` on other platforms by default). Larger values might help with sound stuttering but will introduce more latency.

##### negotiate

  Negotiate a possibly better blocksize setting (`off` on Windows, `on` on other platforms by default). Enable if you’re not getting audio or the sound is stuttering with your `blocksize` setting. Disable to force the manually set `blocksize` value.

  Possible values: `on`, `off`

##### compressor

  Enable the auto-levelling dynamic range compressor on the master channel.

  The compressor automatically reduces the volume of loud peaks to prevent harsh clipping distortion. This is especially useful in games with wide dynamic range — explosions and sound effects that are much louder than the background music.

  The trade-off is a subtle “pumping” effect: when a loud sound triggers the compressor, it briefly pulls down the overall volume, which can cause the background music to dip noticeably. For most games, the compressor works transparently and you won’t notice it.

  If you hear distracting volume pumping, a better approach is to lower the master volume (e.g., `MIXER MASTER 50`) so that peaks stay below the clipping level and the compressor stays inactive. You can also lower individual channel volumes to tame specific loud devices.

  Possible values: `on` default, `off`

##### denoiser

  Remove low-level residual noise from the output of the OPL synth and the Roland Sound Canvas. The emulation of these devices is accurate to the original hardware, which includes the emulation of very low-level semi-random noise. Although this is authentic, most people would find it slightly annoying.

  Possible values:

  - `on` default – Enable the denoiser on the OPL and SOUNDCANVAS channels. The denoiser does not introduce any sound quality degradation; it only removes the barely audible residual noise in quiet passages.
  - `off` – Disable the denoiser.

1. The output can either mono or stereo, depending on the selected model. ↩↩