Home

xmn / bettertrumpet

publicxammen/BetterTrumpet· sync paused
Overview Code History Branches Pull requestsIssuesInsights
master
HomeOverview Code PRsIssues

feat: Add device switch notification setting and optimize BeginInvoke calls

last month

3038c2c
Authored
xammen8/23/2026, 2:29:12 PM
- Add ShowDeviceSwitchNotification setting (default: true)
- Add notification toggle in Shortcuts settings page
- Apply setting to CycleDefaultDevice and OnDeviceHotkeyPressed
- Optimize BeginInvoke calls by checking Dispatcher.CheckAccess first
- Reduce unnecessary dispatcher overhead in VolumeSlider and FlyoutWindow
- Peak meter timer already optimized (only runs when flyout visible)

Performance improvements:
- Reduced dispatcher allocations in hot paths
- Eliminated redundant BeginInvoke when already on UI thread

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Parent211d429

6 files changed
  • EarTrumpet/Addons/EarTrumpet.Actions/DataModel/Processing/ActionProcessor.cs+12−0
  • EarTrumpet/App.xaml.cs+11−3
  • EarTrumpet/AppSettings.cs+7−0
  • EarTrumpet/SettingsWeb/src/SettingsPages.tsx+1−0
  • EarTrumpet/UI/Controls/VolumeSlider.cs+2−1
  • EarTrumpet/UI/Views/FlyoutWindow.xaml.cs+6−4