History

stopgap with MyAvatar.qmlPosition

Zach Pomerantz committed 9 years ago

Commit a7e1b751 parent d3d36324 files · +20 −2Browse files

Showing the changes to libraries/script-engine/src/AudioScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

libraries/script-engine/src/AudioScriptingInterface.cpp+9−0
@@ -11,6 +11,8 @@ · 10 unmodified lines
1111
1212 #include "AudioScriptingInterface.h"
1313
14+#include <QVector3D>
15+
1416 #include "ScriptAudioInjector.h"
1517 #include "ScriptEngineLogging.h"
1618
@@ -19,6 +21,13 @@ void registerAudioMetaTypes(QScriptEngine* engine) { · 2 unmodified lines
1921 qScriptRegisterMetaType(engine, soundSharedPointerToScriptValue, soundSharedPointerFromScriptValue);
2022 }
2123
24+ScriptAudioInjector* AudioScriptingInterface::playSystemSound(SharedSoundPointer sound, const QVector3D& position) {
25+ AudioInjectorOptions options;
26+ options.position = glm::vec3(position.x(), position.y(), position.z());
27+ options.localOnly = true;
28+ return playSound(sound, options);
29+}
30+
2231 ScriptAudioInjector* AudioScriptingInterface::playSound(SharedSoundPointer sound, const AudioInjectorOptions& injectorOptions) {
2332 if (QThread::currentThread() != thread()) {
2433 ScriptAudioInjector* injector = NULL;