Windows audio render volume settings, from local to global

Windows audio render volume settings, from local to global

  • Comments 2

Windows has four different volume settings for any given piece of audio; they are all applied simultaneously. For example, if one of these settings is muted, you will not hear the audio, even if the others are turned up to "full". Here they are, from local to global:

Stream volume

The WASAPI API for this is IAudioStreamVolume.

This most local volume control is used only in rather specialized situations. If a particular app wants to play multiple audio streams to the same audio device, and in the same session (see below), but wants to control the volumes for the streams independently, this is the volume control to use. For example:

  • A media playback app might want to cross fade songs n and n + 1 in a playlist; it could do this by playing the songs in different streams, gradually bringing the volume for song n down to zero, while simultaneously bringing the volume for song n + 1 up to full.
  • A game might offer distinct volume controls for:
    • The background music in the game
    • The sound effects (gunshots, explosions, and so on)
    • Voice chat in the game
    The first two would likely be in the same session and would thus use stream volume controls (exposed via the game UI - Windows does not offer UI for stream volume.) The third could very well be a different session, and even use a different device - the background music and sound effects might go to the default console device (e.g., speakers) while the voice chat might go to the default communications device (e.g., a headset.)

Apps could also get these same effects by doing their own mixing and volume handling, and playing a single stream to the Windows audio engine, of course.

Session volume

By and large, this is the volume control that apps most commonly use. The WASAPI APIs for this are ISimpleAudioVolume and the more-rarely used IChannelAudioVolume.

This is what people mean when they say "application volume" - a session is, by and large, an app (though there are exceptions in both directions.) This is the "S" in "WASAPI" - Windows Audio Session API.

The session volume shows up in the Volume Mixer - each "Application" slider is a session volume control. This is also usually (but not always) tied to a volume control in the app.

Endpoint volume

The WASAPI API for this is IAudioEndpointVolume. Apps should generally prefer ISimpleAudioVolume to this because IAudioEndpointVolume will affect all apps on the system.

This is what people mean when they say "system volume." It is exposed in the following three places in the UI. Note if you have multiple audio devices, each has its own setting.

Ducking

More about ducking

When you get a phone call or start a voice chat, Windows (starting in Windows 7) will attenuate (or "duck") all of the audio on the system (except for phone calls and voice chats.) This is the "most global" because it affects all streams on all audio devices. Note that this volume control only has three settings (four if you count "mute".)

 

Larry Osterman did a series of audio volume posts - one of them contains much of the information in this post, though the ducking feature was added after his post.

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • Surely endpoint volume is more global than ducking?

    "IAudioEndpointVolume will affect all apps on the system."

    Ducking only affects "all of the audio on the system (except for phone calls and voice chats.)"

  • A reasonable question - ducking is both more and less global than endpoint volume.

    Endpoint volume affects a particular device.  If you have an HDMI output, USB speakers, a headphone jack, and a Bluetooth headset, then the endpoint volume on the USB speakers will affect only the speakers.

    Ducking will affect all audio streams, across all devices (this is the part where it is more global) with two exceptions (this is the part where it is less global:)

    * Communications streams are not impacted

    * Apps that have opted-out of ducking are not impacted

Page 1 of 1 (2 items)