@@ -13,6 +13,7 @@ namespace Audio::Internal {
1313 bool audioExporterClippingCheckEnabled{true };
1414 bool audioExporterEnableAdvancedOptions{false };
1515 bool audioExporterUseTemporaryFile{true };
16+ bool shouldPlayNotificationSoundWhenExportCompleted{true };
1617 };
1718
1819 static AudioPreference *m_instance = nullptr ;
@@ -39,11 +40,13 @@ namespace Audio::Internal {
3940 d->audioExporterClippingCheckEnabled = settings->value (" audioExporterClippingCheckEnabled" , true ).toBool ();
4041 d->audioExporterEnableAdvancedOptions = settings->value (" audioExporterEnableAdvancedOptions" , true ).toBool ();
4142 d->audioExporterUseTemporaryFile = settings->value (" audioExporterUseTemporaryFile" , true ).toBool ();
43+ d->shouldPlayNotificationSoundWhenExportCompleted = settings->value (" shouldPlayNotificationSoundWhenExportCompleted" , true ).toBool ();
4244 emit playbackBehaviorChanged ();
4345 emit playbackTogglingActionChanged ();
4446 emit audioExporterClippingCheckEnabledChanged ();
4547 emit audioExporterEnableAdvancedOptionsChanged ();
4648 emit audioExporterUseTemporaryFileChanged ();
49+ emit shouldPlayNotificationSoundWhenExportCompletedChanged ();
4750 settings->endGroup ();
4851 }
4952
@@ -56,6 +59,7 @@ namespace Audio::Internal {
5659 settings->setValue (" audioExporterClippingCheckEnabled" , d->audioExporterClippingCheckEnabled );
5760 settings->setValue (" audioExporterEnableAdvancedOptions" , d->audioExporterEnableAdvancedOptions );
5861 settings->setValue (" audioExporterUseTemporaryFile" , d->audioExporterUseTemporaryFile );
62+ settings->setValue (" shouldPlayNotificationSoundWhenExportCompleted" , d->shouldPlayNotificationSoundWhenExportCompleted );
5963 settings->endGroup ();
6064 }
6165
@@ -128,4 +132,17 @@ namespace Audio::Internal {
128132 emit m_instance->audioExporterUseTemporaryFileChanged ();
129133 }
130134
135+ bool AudioPreference::shouldPlayNotificationSoundWhenExportCompleted () {
136+ M_INSTANCE_D ;
137+ return d->shouldPlayNotificationSoundWhenExportCompleted ;
138+ }
139+
140+ void AudioPreference::setShouldPlayNotificationSoundWhenExportCompleted (bool shouldPlay) {
141+ M_INSTANCE_D ;
142+ if (d->shouldPlayNotificationSoundWhenExportCompleted == shouldPlay)
143+ return ;
144+ d->shouldPlayNotificationSoundWhenExportCompleted = shouldPlay;
145+ emit m_instance->shouldPlayNotificationSoundWhenExportCompletedChanged ();
146+ }
147+
131148}
0 commit comments