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>
This commit is contained in:
1 parent
2380f233b5
commit
5d261717fe
14 files changed
+829
-89
No files matched your search
@@ -20,8 +20,12 @@ public partial class App : Application
|
||||
// so a running broadcast keeps going while the user switches pages.
|
||||
services.AddSingleton(_ => new SongRepository(SongRepository.DefaultDatabasePath));
|
||||
services.AddSingleton(_ => new ScheduleGenerator());
|
||||
services.AddSingleton(provider => new SettingsStore(provider.GetRequiredService<ScheduleGenerator>(), AppSettings.DefaultPath));
|
||||
services.AddSingleton(provider => new SettingsStore(
|
||||
provider.GetRequiredService<ScheduleGenerator>(), provider.GetRequiredService<ProgramOutput>(), AppSettings.DefaultPath));
|
||||
services.AddSingleton(_ => new PlaybackEngine());
|
||||
// The one audio channel that songs and the microphone share.
|
||||
services.AddSingleton(_ => ProgramOutput.Instance);
|
||||
services.AddSingleton<Microphone>();
|
||||
services.AddSingleton(provider => new ScheduleController(
|
||||
provider.GetRequiredService<SongRepository>(),
|
||||
provider.GetRequiredService<ScheduleGenerator>(),
|
||||
@@ -57,7 +61,7 @@ public partial class App : Application
|
||||
{
|
||||
base.OnStartup(e);
|
||||
_services = BuildServices();
|
||||
// Loads the settings and gives the generator its minutes per hour before the first plan.
|
||||
// Loads the settings: the generator gets its minutes per hour before the first plan, the audio output its devices.
|
||||
_services.GetRequiredService<SettingsStore>();
|
||||
// Follow the Windows setting: light, dark or a high-contrast theme.
|
||||
Wpf.Ui.Appearance.ApplicationThemeManager.ApplySystemTheme();
|
||||
|
||||
Reference in new issue
Block a user