From 0bc4ea9c4d1d5d0dbfd3fa85026e18796a175fa4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 21 Dec 2020 15:04:22 +1000 Subject: [PATCH] ask users to report if PyAudio works better for them --- qt/aqt/preferences.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/qt/aqt/preferences.py b/qt/aqt/preferences.py index 273d87eb6..98d7e0788 100644 --- a/qt/aqt/preferences.py +++ b/qt/aqt/preferences.py @@ -252,9 +252,18 @@ class Preferences(QDialog): restart_required = True self.mw.pm.set_interrupt_audio(self.form.interrupt_audio.isChecked()) - self.mw.pm.set_recording_driver( - self._recording_drivers[self.form.recording_driver.currentIndex()] - ) + + new_audio_driver = self._recording_drivers[ + self.form.recording_driver.currentIndex() + ] + if self.mw.pm.recording_driver() != new_audio_driver: + self.mw.pm.set_recording_driver(new_audio_driver) + if new_audio_driver == RecordingDriver.PyAudio: + showInfo( + """\ +The PyAudio driver will likely be removed in a future update. If you find it works better \ +for you than the default driver, please let us know on the Anki forums.""" + ) if restart_required: showInfo(tr(TR.PREFERENCES_CHANGES_WILL_TAKE_EFFECT_WHEN_YOU))