feat(dock): the MIC bay — dB fader, measured ladder, mute, picker
Unit 5. The dock's first working bay: - 24-segment ladder fed by `MicMeterFraction` — the MEASURED display level (already scaled by the volume and zeroed when muted), never the gain setting. - Fader in dB via `MicVolumeDb` (−60 … +6, 0 = unity) with a mono-weight readout (`MicVolumeDbLabel`), so "−6.0 dB" is what the creator reads instead of "0.50". - Mute button whose dot uses the existing MicStatusBrush; clicking the device name opens the mic picker, so the label stays the control (the KISS rule: one place to change the mic). The preview's own mic row stays for now — it is removed in the final unit, after the dock bays are complete, so nothing is lost if a bay misbehaves. Guard: MicBayTests — the bay binds the dB face and the measured level (not the gain), the fader range IS the scale's range, the VM surface exists, and mute still zeroes the ladder.
This commit is contained in:
@@ -33,6 +33,12 @@ public partial class AudioDock : UserControl
|
||||
Bays.Visibility = collapsed ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
private void MicLabel_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.MainViewModel vm && vm.OpenMicPickerCommand.CanExecute(null))
|
||||
vm.OpenMicPickerCommand.Execute(null);
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_window = Window.GetWindow(this);
|
||||
|
||||
Reference in New Issue
Block a user