pub const AMP_EQ_BANDS: usize = 5;
pub const AMP_TONE_FLAT: u8 = 128;
pub const AMP_TONE_HTTP_MIN: u8 = 104;
pub const AMP_TONE_HTTP_MAX: u8 = 140;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct AmpZoneSettings {
pub gain_left: u8,
pub gain_right: u8,
pub volume_min: u8,
pub volume_max: u8,
pub delay_left: u32,
pub delay_right: u32,
pub bass: u8,
pub treble: u8,
pub bridged: u8,
pub power_mode: u8,
pub power_level: u8,
pub power_timeout: u32,
pub eq_left: [u8; AMP_EQ_BANDS],
pub eq_right: [u8; AMP_EQ_BANDS],
}
impl Default for AmpZoneSettings {
fn default() -> Self {
Self {
gain_left: 0,
gain_right: 0,
volume_min: 0,
volume_max: 0,
delay_left: 0,
delay_right: 0,
bass: AMP_TONE_FLAT,
treble: AMP_TONE_FLAT,
bridged: 0,
power_mode: 0,
power_level: 0,
power_timeout: 0,
eq_left: [AMP_TONE_FLAT; AMP_EQ_BANDS],
eq_right: [AMP_TONE_FLAT; AMP_EQ_BANDS],
}
}
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct AmpDolbySettings {
pub mode: u8,
pub pcm_upmix: bool,
pub dolby_detected: bool,
pub pcm_upmix_active: bool,
}