Showing the changes to libraries/script-engine/src/AudioScriptingInterface.cpp (1 of 11 files). Show all
Unified · Split
| @@ -28,19 +28,19 @@ AudioScriptingInterface& AudioScriptingInterface::getInstance() { · 27 unmodified lines | |||
| 28 | AudioScriptingInterface::AudioScriptingInterface() : | 28 | AudioScriptingInterface::AudioScriptingInterface() : |
| 29 | _localAudioInterface(NULL) | 29 | _localAudioInterface(NULL) |
| 30 | { | 30 | { |
| 31 | 31 | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | ScriptAudioInjector* AudioScriptingInterface::playSound(Sound* sound, const AudioInjectorOptions& injectorOptions) { | 34 | ScriptAudioInjector* AudioScriptingInterface::playSound(Sound* sound, const AudioInjectorOptions& injectorOptions) { |
| 35 | if (QThread::currentThread() != thread()) { | 35 | if (QThread::currentThread() != thread()) { |
| 36 | ScriptAudioInjector* injector = NULL; | 36 | ScriptAudioInjector* injector = NULL; |
| 37 | 37 | ||
| 38 | QMetaObject::invokeMethod(this, "playSound", Qt::BlockingQueuedConnection, | 38 | QMetaObject::invokeMethod(this, "playSound", Qt::BlockingQueuedConnection, |
| 39 | Q_RETURN_ARG(ScriptAudioInjector*, injector), | 39 | Q_RETURN_ARG(ScriptAudioInjector*, injector), |
| 40 | Q_ARG(Sound*, sound), Q_ARG(const AudioInjectorOptions&, injectorOptions)); | 40 | Q_ARG(Sound*, sound), Q_ARG(const AudioInjectorOptions&, injectorOptions)); |
| 41 | return injector; | 41 | return injector; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | if (sound) { | 44 | if (sound) { |
| 45 | // stereo option isn't set from script, this comes from sound metadata or filename | 45 | // stereo option isn't set from script, this comes from sound metadata or filename |
| 46 | AudioInjectorOptions optionsCopy = injectorOptions; | 46 | AudioInjectorOptions optionsCopy = injectorOptions; |