Showing the changes to libraries/script-engine/src/AudioScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -46,16 +46,6 @@ ScriptAudioInjector* AudioScriptingInterface::playSystemSound(SharedSoundPointer · 45 unmodified lines | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | ScriptAudioInjector* AudioScriptingInterface::playSound(SharedSoundPointer sound, const AudioInjectorOptions& injectorOptions) { | 48 | ScriptAudioInjector* AudioScriptingInterface::playSound(SharedSoundPointer sound, const AudioInjectorOptions& injectorOptions) { |
| 49 | if (QThread::currentThread() != thread()) { | ||
| 50 | ScriptAudioInjector* injector = NULL; | ||
| 51 | |||
| 52 | BLOCKING_INVOKE_METHOD(this, "playSound", | ||
| 53 | Q_RETURN_ARG(ScriptAudioInjector*, injector), | ||
| 54 | Q_ARG(SharedSoundPointer, sound), | ||
| 55 | Q_ARG(const AudioInjectorOptions&, injectorOptions)); | ||
| 56 | return injector; | ||
| 57 | } | ||
| 58 | |||
| 59 | if (sound) { | 49 | if (sound) { |
| 60 | // stereo option isn't set from script, this comes from sound metadata or filename | 50 | // stereo option isn't set from script, this comes from sound metadata or filename |
| 61 | AudioInjectorOptions optionsCopy = injectorOptions; | 51 | AudioInjectorOptions optionsCopy = injectorOptions; |