feat(dock): master strip + MONO output (the accessibility switch)
Unit 9, the one that matters most for this creator. MASTER STRIP (top, nearest the preview): - one ladder fed by the MEASURED mix — `AudioMixer` now measures the buffer the encoder receives (`MasterLevel`, `MasterImbalanceDb`), so the master cannot show a source instead of the output - `-12.4 dB` readout, and ONE L/R flag that appears above a 6 dB gap instead of a second ladder - bitrate / FPS / dropped / duration from the existing health poll MONO OUTPUT: - `AudioFold.ToMono` averages each stereo pair into both channels, applied after the limiter and the sync delay, so the stream AND the recording get what was folded - `MonoOutput` is persisted (`Audio.MonoOutput`) and restored at startup: an accessibility switch that resets each session is an accessibility failure - one click in the strip, remembered forever Guard: AudioFoldTests (hard-left reaches the right at half amplitude, hard-right — the inaudible case — reaches the left, centred material keeps its level, mono buffers untouched) and MasterStripTests (the strip binds the measured mix + the switch, the store round-trips it, and the fold is the tested helper rather than new arithmetic). 33 audio tests green.
This commit is contained in:
@@ -214,6 +214,50 @@
|
||||
<DockPanel VerticalAlignment="Center">
|
||||
<TextBlock DockPanel.Dock="Left" Text="MASTER" FontSize="10" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}" VerticalAlignment="Center"/>
|
||||
|
||||
<!-- One ladder for the mix, plus the imbalance flag: two ladders would cost the
|
||||
width that the telemetry needs, and the flag is the case that matters. -->
|
||||
<controls:SegmentMeter DockPanel.Dock="Left" Width="120" Height="8" Margin="10,0,0,0"
|
||||
Orientation="Horizontal" Segments="24"
|
||||
Level="{Binding MasterMeterFraction}" VerticalAlignment="Center"/>
|
||||
<TextBlock DockPanel.Dock="Left" Width="62" Margin="6,0,0,0" FontSize="10"
|
||||
FontFamily="{StaticResource FontFamily.Mono}" VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}"
|
||||
Text="{Binding MasterLevelLabel}"/>
|
||||
|
||||
<Border DockPanel.Dock="Left" Margin="6,0,0,0" Padding="5,1" VerticalAlignment="Center"
|
||||
CornerRadius="{StaticResource Radius.Sm}" Background="{StaticResource Brush.SurfaceContainerHigh}"
|
||||
Visibility="{Binding MasterImbalance, Converter={StaticResource BoolToVis}}"
|
||||
ToolTip="Left and right differ by more than 6 dB — one side may be inaudible.">
|
||||
<TextBlock Text="L/R" FontSize="9" FontWeight="Bold" FontFamily="{StaticResource FontFamily.Mono}"
|
||||
Foreground="{StaticResource Brush.Attention}"/>
|
||||
</Border>
|
||||
|
||||
<!-- MONO: the accessibility switch, one click, remembered. -->
|
||||
<ToggleButton DockPanel.Dock="Left" Margin="10,0,0,0" Height="20" Padding="8,0"
|
||||
Style="{StaticResource SegmentToggle}" IsChecked="{Binding MonoOutput, Mode=TwoWay}"
|
||||
ToolTip="Fold the output to mono — both ears hear everything">
|
||||
<TextBlock Text="MONO" FontSize="10" FontWeight="Bold"
|
||||
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ToggleButton}}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<TextBlock FontSize="10" FontFamily="{StaticResource FontFamily.Mono}" Margin="0,0,12,0"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}">
|
||||
<Run Text="{Binding CurrentHealth.CurrentBitrate, StringFormat={}{0:0} kbps}"/>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="10" FontFamily="{StaticResource FontFamily.Mono}" Margin="0,0,12,0"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}">
|
||||
<Run Text="{Binding CurrentHealth.FPS, StringFormat={}{0:0} fps}"/>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="10" FontFamily="{StaticResource FontFamily.Mono}" Margin="0,0,12,0"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}">
|
||||
<Run Text="drop "/><Run Text="{Binding CurrentHealth.DroppedFrames}"/>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="10" FontFamily="{StaticResource FontFamily.Mono}"
|
||||
Foreground="{StaticResource Brush.OnSurfaceVariant}"
|
||||
Text="{Binding CurrentHealth.StreamDuration, StringFormat={}{0:hh\:mm\:ss}}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user