summaryrefslogtreecommitdiffstats
path: root/pica-client/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pica-client/main.cpp')
-rw-r--r--pica-client/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/pica-client/main.cpp b/pica-client/main.cpp
index f10353e..330f487 100644
--- a/pica-client/main.cpp
+++ b/pica-client/main.cpp
@@ -37,6 +37,7 @@
#include "dhparam.h"
#include "settings.h"
#include "dialogs/settingsdialog.h"
+#include "audiodevice.h"
//globals
@@ -447,6 +448,15 @@ static bool create_config_dir()
update_database();
QFile::setPermissions(config_dbname, QFile::ReadOwner | QFile::WriteOwner);
+
+ // Publish the audio driver choice to the audio threads while we are still
+ // the only thread and the settings database is reachable - see
+ // AudioDevice::SetLinuxDriverName() for why it cannot be read on demand.
+ {
+ Settings audiost(config_dbname);
+ AudioDevice::SetLinuxDriverName(audiost.loadValue("audio.driver", "alsa").toString());
+ }
+
/*if (!QFile::exists(config_dir + QDir::separator() + PICA_CLIENT_DHPARAMFILE))
{
OpenSSLTool osslt;