mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 03:30:30 +02:00
added mutex for audio handler
This commit is contained in:
parent
e709561a62
commit
e581c66b56
2 changed files with 4 additions and 1 deletions
|
@ -680,7 +680,9 @@ void OffscreenQmlSurface::create() {
|
|||
// Setup the update of the QML media components with the current audio output device
|
||||
QObject::connect(&_audioOutputUpdateTimer, &QTimer::timeout, this, [this]() {
|
||||
if (_currentAudioOutputDevice.size() > 0) {
|
||||
new AudioHandler(sharedFromThis(), _currentAudioOutputDevice);
|
||||
QMutexLocker lock(&_audioHandlerMutex);
|
||||
QString audioDeviceName = _currentAudioOutputDevice;
|
||||
new AudioHandler(sharedFromThis(), audioDeviceName);
|
||||
}
|
||||
});
|
||||
int waitForAudioQmlMs = 200;
|
||||
|
|
|
@ -173,6 +173,7 @@ private:
|
|||
uint64_t _lastRenderTime { 0 };
|
||||
uvec2 _size;
|
||||
|
||||
QMutex _audioHandlerMutex;
|
||||
QTimer _audioOutputUpdateTimer;
|
||||
QString _currentAudioOutputDevice;
|
||||
|
||||
|
|
Loading…
Reference in a new issue