26QQuick3DAmbientSound::QQuick3DAmbientSound()
28 m_sound =
new QAmbientSound(QQuick3DAudioEngine::getEngine());
30 connect(m_sound, &QAmbientSound::sourceChanged,
this, &QQuick3DAmbientSound::sourceChanged);
31 connect(m_sound, &QAmbientSound::volumeChanged,
this, &QQuick3DAmbientSound::volumeChanged);
32 connect(m_sound, &QAmbientSound::loopsChanged,
this, &QQuick3DAmbientSound::loopsChanged);
33 connect(m_sound, &QAmbientSound::autoPlayChanged,
this, &QQuick3DAmbientSound::autoPlayChanged);
35 auto *soundPrivate = QAmbientSoundPrivate::get(m_sound);
36 soundPrivate->m_sourceResolver =
37 std::make_unique<QMultimediaPrivate::QQmlContextSourceResolver>(
this);