$OpenBSD: patch-src_mumble_AudioWizard_cpp,v 1.2 2014/01/23 09:52:51 dcoppa Exp $

Disable submitting anonymous statistics

Disable Text-To-Speech; use sound notifications by default

There's a convoluted threading issue: in PAAudio.cpp, around line 338,
it will get caught in an infinite loop. It relies on the PortAudioInput
object being destroyed in another thread, thereby setting bRunning to
false and telling it to exit the loop, which will never happen. Luckily,
this bug is only exposed by the AudioWizard configuration stuff. So,
skip calling restartAudio() from on_qsOutputDelay_valueChanged() while
the AudioWizard is starting up

--- src/mumble/AudioWizard.cpp.orig	Sat Jun  1 23:16:31 2013
+++ src/mumble/AudioWizard.cpp	Wed Jan 22 06:40:54 2014
@@ -62,7 +62,8 @@ AudioWizard::AudioWizard(QWidget *p) : QWizard(p) {
 	setupUi(this);
 
 	// Done
-	qcbUsage->setChecked(g.s.bUsage);
+	qcbUsage->setEnabled(false);
+	qcbUsage->setChecked(false);
 
 	// Device
 	if (AudioInputRegistrar::qmNew) {
@@ -114,18 +115,10 @@ AudioWizard::AudioWizard(QWidget *p) : QWizard(p) {
 	else
 		qrbQualityCustom->setChecked(true);
 
-	quint32 iMessage = Settings::LogNone;
-	for (int i = Log::firstMsgType;i <= Log::lastMsgType; ++i) {
-		iMessage |= (g.s.qmMessages[i] & (Settings::LogSoundfile | Settings::LogTTS));
-	}
+	qrbNotificationTTS->setEnabled(false);
+	qrbNotificationTTS->setChecked(false);
+	qrbNotificationSounds->setChecked(true);
 
-	if (iMessage == Settings::LogTTS && g.s.bTTS)
-		qrbNotificationTTS->setChecked(true);
-	else if (iMessage == Settings::LogSoundfile)
-		qrbNotificationSounds->setChecked(true);
-	else // If we find mixed message types or only tts with main tts disable assume custom
-		qrbNotificationCustom->setChecked(true);
-
 	qrbNotificationCustom->setVisible(qrbNotificationCustom->isChecked());
 
 	qrbQualityCustom->setVisible(qrbQualityCustom->isChecked());
@@ -308,7 +301,8 @@ void AudioWizard::on_qcbOutputDevice_activated(int) {
 void AudioWizard::on_qsOutputDelay_valueChanged(int v) {
 	qlOutputDelay->setText(tr("%1 ms").arg(v*10));
 	g.s.iOutputDelay = v;
-	restartAudio();
+	if (! bInit)
+		restartAudio();
 }
 
 void AudioWizard::on_qsMaxAmp_valueChanged(int v) {
