Commit 6c135712 authored by Holger Kaelberer's avatar Holger Kaelberer
Browse files

core: Startup: delay playing welcome voices until voices are available

Without playing the intro music AND activated automatic downloads,
there was a race condition between registering voices rcc and the
playback of welcome.ogg.

We now delay it if voices are not yet available about max. 10 secs.
parent 769520f6
...@@ -40,10 +40,33 @@ Window { ...@@ -40,10 +40,33 @@ Window {
id: audioVoices id: audioVoices
muted: !ApplicationSettings.isAudioVoicesEnabled muted: !ApplicationSettings.isAudioVoicesEnabled
Timer {
id: delayedWelcomeTimer
interval: 10000 /* Make sure, that playing welcome.ogg if delayed
* because of not yet registered voices, will only
* happen max 10sec after startup */
repeat: false
onTriggered: {
function playWelcome() {
Component.onCompleted: { Component.onCompleted: {
if(ApplicationSettings.isAudioEffectsEnabled) if(ApplicationSettings.isAudioEffectsEnabled)
append("qrc:/gcompris/src/core/resource/intro.ogg") append("qrc:/gcompris/src/core/resource/intro.ogg")
if (DownloadManager.areVoicesRegistered())
else {
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment