feat(dock): TRAX gets its own ladder — measured at the player's output
Creator: "why is there no meter for when trax is playing?" Routing answer: TRAX rides the desktop loopback, so it already moved the GAME ladder — there was no separate TRAX signal in the mix. But that ladder cannot answer the question a deaf creator actually has: "is the music producing sound at all?" The play glyph cannot either — an open file with a dead decoder still reports Playing. So the player now measures its own output: \`MusicPlayer\` wraps the volume stage in an NAudio \`MeteringSampleProvider\` and exposes \`Level\`; \`ITraxPlayer.Level\` keeps the fake honest. The VM maps it through the same display scale (\`TraxMeterFraction\`), zeroed when not playing, and the TRAX bay carries a 24-segment ladder above its fader. This reverses my earlier "no ladder, nothing honest to show" — the honest thing arrived with a real measurement. TraxBayTests flipped accordingly (it now asserts the ladder AND its source).
This commit is contained in:
@@ -79,6 +79,11 @@ public partial class MainViewModel
|
||||
|
||||
public string TraxVolumeDbLabel => Helpers.GainDb.Label(TraxVolumeDb) + " dB";
|
||||
|
||||
/// <summary>The TRAX ladder: the player's own measured output, so "is music actually making
|
||||
/// sound" is answerable without hearing it.</summary>
|
||||
public double TraxMeterFraction =>
|
||||
IsMusicPlaying ? Services.Audio.AudioLevelMeter.ToDisplay(_musicPlayer.Level) : 0;
|
||||
|
||||
/// <summary>Track name, or an honest "No track".</summary>
|
||||
public string TraxTrackLabel => _musicPlayer.TrackName ?? "No track";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user