BASS

BASS_CONFIG_DEV_DEFAULT config option


Include a "Default" entry in the output device list?

BASS_SetConfig(
    BASS_CONFIG_DEV_DEFAULT,
    BOOL default
);

Parameters

defaultIf TRUE, a "Default" device will be included in the device list.

Remarks

BASS does not usually include a "Default" entry in its device list, as that would ultimately map to one of the other devices and be a duplicate entry. When the default device is requested in a BASS_Init call (with device = -1), BASS will check the default device at that time, and initialize it. But Windows 7 has the ability to automatically switch the default output to the new default device whenever it changes, and in order for that to happen, the default device (rather than a specific device) needs to be used. That is where this option comes in.

When enabled, the "Default" device will also become the default device to BASS_Init (with device = -1). When the "Default" device is used, the BASS_SetVolume and BASS_GetVolume functions work a bit differently to usual; they deal with the "session" volume, which only affects the current process's output on the device, rather than the device's volume.

This option can only be set before BASS_GetDeviceInfo or BASS_Init has been called.

Platform-specific

This config option is only available on Windows. It is available on all Windows versions (not including CE), but only Windows 7 has the default output switching feature.

See also

BASS_GetConfig, BASS_SetConfig, BASS_Init