feat(alerts): sound byte under Built-in video, and alert audio that reaches the device
Creator request: a sound-byte browse + label under Built-in video, with an option to loop the sound while the clip plays. The video itself is always one pass to completion. - Source gains AlertAudioPath and AlertAudioLoop, persisted (column + migration + INSERT + SELECT + reader, the whole chain — that chain is where the blur crashed once). - The sound byte plays through MediaPlayer on the default output device; MediaEnded re-seeks to zero while looping, and StopClip kills it so a tail cannot bleed into the next alert. - The clip's OWN soundtrack moved off the mixer and onto the device as well (Services/Audio/AlertAudioOutput: one WaveOutEvent + buffered float provider). Why the move: the creator asked that alert audio — the clip's track or the added sound byte — appear in the desktop sound bar. Only audio that reaches the default device is picked up by the WASAPI loopback that feeds both the meter and the stream. The old EnqueueAlertAudio route put the sound in the stream but left the meter flat and the room silent. Tests: the sound byte and its loop flag round-trip through SQLite, and a fresh alert layer starts with no sound byte and no loop. Release 0 warnings.
This commit is contained in:
@@ -152,3 +152,12 @@ published decisions (recorded in `TASKS/task-43-native-alerts.md`):
|
||||
limiter and added at **unity — never ducked** (creator ruling: "don't lower my game
|
||||
audio for a tip"); `StartLive` clears it. Per-alert loudness = the Volume slider.
|
||||
|
||||
- **Alert sound byte (2026-11-01, creator ruling):** the alert layer can carry an audio file
|
||||
(`AlertAudioPath`) that plays with the clip, plus `AlertAudioLoop` to repeat it under the clip
|
||||
("Loop the sound until the video ends"). The video is always one pass to completion.
|
||||
⛔ **Alert audio plays on the DEFAULT OUTPUT DEVICE, not into the mixer** (`Services/Audio/
|
||||
AlertAudioOutput` for the clip's own PCM, `MediaPlayer` for the sound byte). That is deliberate:
|
||||
only audio that reaches the speakers is captured by the WASAPI loopback, which is what makes it
|
||||
audible to the creator *and* visible in the desktop sound bar. The old `EnqueueAlertAudio` path
|
||||
produced sound that was in the stream but invisible in the meter and inaudible in the room.
|
||||
Failure to open a device is logged and swallowed — a silent alert still renders.
|
||||
|
||||
Reference in New Issue
Block a user