pub trait AudioSource: DeviceState {
// Required methods
fn rate_hz(&self) -> f64;
fn gain(&self) -> f64;
fn take_samples(&mut self, mclk: i64) -> Vec<(i32, i32)>;
// Provided method
fn applies_gain(&self) -> bool { ... }
}Expand description
A mixer input with a changeable rate and gain. The PSG is board-owned and first in the list; the CD adds CD-DA (44.1 kHz) and ADPCM (variable).
Required Methods§
Provided Methods§
Sourcefn applies_gain(&self) -> bool
fn applies_gain(&self) -> bool
True when the source’s samples already carry its gain (the PSG): the mixer must not apply it a second time.