mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-12 20:15:47 +02:00
back to for loop
This commit is contained in:
parent
0729579266
commit
9cd2dc921a
1 changed files with 2 additions and 4 deletions
|
@ -140,9 +140,7 @@ public:
|
||||||
}
|
}
|
||||||
auto rootItem = _surface->getRootItem();
|
auto rootItem = _surface->getRootItem();
|
||||||
if (rootItem) {
|
if (rootItem) {
|
||||||
auto children = rootItem->findChildren<QMediaPlayer*>();
|
for (auto player : rootItem->findChildren<QMediaPlayer*>()) {
|
||||||
for (int i = 0; i < children.size(); i++) {
|
|
||||||
auto player = children[i];
|
|
||||||
auto mediaState = player->state();
|
auto mediaState = player->state();
|
||||||
QMediaService *svc = player->service();
|
QMediaService *svc = player->service();
|
||||||
if (nullptr == svc) {
|
if (nullptr == svc) {
|
||||||
|
@ -704,7 +702,7 @@ void OffscreenQmlSurface::forceQmlAudioOutputDeviceUpdate() {
|
||||||
} else {
|
} else {
|
||||||
auto audioIO = DependencyManager::get<AudioClient>();
|
auto audioIO = DependencyManager::get<AudioClient>();
|
||||||
QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName();
|
QString deviceName = audioIO->getActiveAudioDevice(QAudio::AudioOutput).deviceName();
|
||||||
int waitForAudioQmlMs = 500;
|
int waitForAudioQmlMs = 200;
|
||||||
// The audio device need to be change using oth
|
// The audio device need to be change using oth
|
||||||
new AudioHandler(this, deviceName, waitForAudioQmlMs);
|
new AudioHandler(this, deviceName, waitForAudioQmlMs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue