pub enum StartupVolume {
Attenuate {
max_db: f64,
},
Keep,
}Expand description
What Dac::open does with the DAC’s hardware volume
before any stream can start.
A DAC keeps the level it had, and many default to full scale. The first audio would then play at whatever that is.
Variants§
Attenuate
Lower every controlled channel to min(its level, max_db) and verify it
by reading it back. A channel is never raised, and one that is already
quieter (or at the device’s silent value) is left alone. max_db is
rounded down to a step the DAC supports; below the DAC’s minimum the
channels go to the minimum and the report says so. The level each
channel had is recorded first, so HandBack::RestoreOriginal
restores it. If the attenuation cannot be verified the volume control is
treated as unusable (see
DacConfig::require_hardware_volume).
Keep
Leave the DAC’s level alone.