4 Commits
Author SHA1 Message Date
fraujulianandClaude Opus 5.5 ef388d82f4 feat(schedule): rework the schedule page controls and timeline
- Mixer in two areas: what the listeners hear (music, microphone) and
  what you hear; the master volume is gone.
- One start button starts the created plan and goes live when laut.fm
  is on; while on air it ends the broadcast.
- The start field takes Jetzt (default), a full hour or a typed time.
  A Jetzt plan moves to the moment it starts.
- Timeline rows can be dragged to a new place; Hinzufügen inserts a
  song, news, an ad or moderator talk as the item after next.
- All page texts are translated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:23:06 +01:00
fraujulian e81257eca6 refactor(cleanup): comments, files and outdated code 2026-11-26 08:24:19 +01:00
fraujulianandClaude Opus 5.5 5d261717fe feat: mix music and microphone on one program output
Songs and the microphone now go through one audio channel,
ProgramOutput, instead of each opening its own device. ProgramMixer
builds two mixes in one pass: the broadcast for the listeners and a
monitor mix for the person at the desk. With two playback devices each
mix gets its own device; with one device the desk hears the monitor
mix.

The Schedule page gets a microphone button that works with or without
a running broadcast, and sliders for the music and microphone levels
on the broadcast, the music level on the monitor, and an option to
hear the broadcast exactly. The Settings page lets the user choose
the playback devices for the broadcast and for themselves.

MusicPlayer plays its tracks into the mixer; pause takes the track
out of the mix and resume puts it back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 08:21:13 +01:00
fraujulianandClaude Opus 5.5 5ea2740895 feat: add music player singleton on NAudio
Add MusicPlayer, a thread-safe lazy singleton that plays one audio
file at a time through NAudio 3.3.0 (WaveOut and AudioFileReader).
It offers Play, Pause, Resume, Stop, Position, Duration, Volume and
IsPlaying, plus TrackFinished and PositionChanged events. The station
needs one shared playback point that later schedule and UI code can
drive.

TrackFinished fires only when a track ends on its own. Stop and Play
unsubscribe from the old output before releasing it, so they never
raise it. Both events run on a thread-pool thread, so WPF callers
must marshal to the dispatcher. Reader and output are disposed on
stop, on replacement and on process exit. A missing file throws
FileNotFoundException and an unreadable one InvalidDataException;
in both cases the player stays stopped.

Tests cover the singleton, error cases and events. Tests that need an
audio device skip when none is present.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 10:24:14 +01:00