Skip to content

Comments

macOS audio device changed fix#1921

Open
jiPku wants to merge 5 commits intostakira:masterfrom
jiPku:macOS-AudioDeviceChanged-Fix
Open

macOS audio device changed fix#1921
jiPku wants to merge 5 commits intostakira:masterfrom
jiPku:macOS-AudioDeviceChanged-Fix

Conversation

@jiPku
Copy link

@jiPku jiPku commented Jan 12, 2026

Audio device change detection and notification:

  • Added a DevicesChanged event to the IAudioOutput interface, and implemented this event in DummyAudioOutput, MiniAudioOutput, and NAudioOutput to notify listeners when the available audio output devices change.
  • In MiniAudioOutput, introduced a polling mechanism using a Timer to periodically check for device changes, compare the current device list with the previous one, and raise the DevicesChanged event when a change is detected. Also ensured thread safety with a lock and cleaned up the timer during disposal.

UI updates for device changes:

  • In PreferencesViewModel, subscribed to the DevicesChanged event to update the list of audio output devices and the current selection in the UI when a device is plugged in or unplugged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant