mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Avoid QSoundEffect var out of scope too early
The object was destroyed and play interrupted
This commit is contained in:
@@ -2083,7 +2083,7 @@ void TrainSidebar::guiUpdate() // refreshes the telemetry
|
||||
if (fPlayAudio) {
|
||||
lapAudioThisLap = false;
|
||||
#if QT_VERSION >= 0x060000
|
||||
QSoundEffect effect;
|
||||
static QSoundEffect effect;
|
||||
effect.setSource(QUrl::fromLocalFile(":audio/lap.wav"));
|
||||
effect.play();
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user