Showing the changes to libraries/script-engine/src/AudioScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -49,7 +49,6 @@ AudioInjector* AudioScriptingInterface::invokedPlaySound(Sound* sound, const Aud · 48 unmodified lines | |||
| 49 | optionsCopy.stereo = sound->isStereo(); | 49 | optionsCopy.stereo = sound->isStereo(); |
| 50 | 50 | ||
| 51 | QThread* injectorThread = new QThread(); | 51 | QThread* injectorThread = new QThread(); |
| 52 | qDebug() << "the injector thread is" << injectorThread; | ||
| 53 | injectorThread->setObjectName("Audio Injector Thread"); | 52 | injectorThread->setObjectName("Audio Injector Thread"); |
| 54 | 53 | ||
| 55 | AudioInjector* injector = new AudioInjector(sound, optionsCopy); | 54 | AudioInjector* injector = new AudioInjector(sound, optionsCopy); |
| @@ -57,12 +56,9 @@ AudioInjector* AudioScriptingInterface::invokedPlaySound(Sound* sound, const Aud · 1 unmodified line | |||
| 57 | 56 | ||
| 58 | injector->moveToThread(injectorThread); | 57 | injector->moveToThread(injectorThread); |
| 59 | 58 | ||
| 60 | qDebug() << "the injector is" << injector; | ||
| 61 | |||
| 62 | // start injecting when the injector thread starts | 59 | // start injecting when the injector thread starts |
| 63 | connect(injectorThread, &QThread::started, injector, &AudioInjector::injectAudio); | 60 | connect(injectorThread, &QThread::started, injector, &AudioInjector::injectAudio); |
| 64 | 61 | ||
| 65 | |||
| 66 | // connect the right slots and signals for AudioInjector and thread cleanup | 62 | // connect the right slots and signals for AudioInjector and thread cleanup |
| 67 | connect(injector, &AudioInjector::destroyed, injectorThread, &QThread::quit); | 63 | connect(injector, &AudioInjector::destroyed, injectorThread, &QThread::quit); |
| 68 | connect(injectorThread, &QThread::finished, injectorThread, &QThread::deleteLater); | 64 | connect(injectorThread, &QThread::finished, injectorThread, &QThread::deleteLater); |