Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -48,7 +48,8 @@ EntityScriptingInterface ScriptEngine::_entityScriptingInterface; · 47 unmodified lines | |||
| 48 | 48 | ||
| 49 | static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { | 49 | static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { |
| 50 | QUrl soundURL = QUrl(context->argument(0).toString()); | 50 | QUrl soundURL = QUrl(context->argument(0).toString()); |
| 51 | QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL), QScriptEngine::ScriptOwnership); | 51 | bool isStereo = context->argument(1).toBool(); |
| 52 | QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL, isStereo), QScriptEngine::ScriptOwnership); | ||
| 52 | 53 | ||
| 53 | return soundScriptValue; | 54 | return soundScriptValue; |
| 54 | } | 55 | } |