mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 14:56:46 +02:00
JS detects when "position" was not set by the script. C++ explicitly sets .positionSet=false when not set (for system sounds). Local rendering uses a direct mix (no attenuation/HRTF) when not set.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
//
|
|
// AudioInjectorOptions.h
|
|
// libraries/audio/src
|
|
//
|
|
// Created by Stephen Birarda on 1/2/2014.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_AudioInjectorOptions_h
|
|
#define hifi_AudioInjectorOptions_h
|
|
|
|
#include <QtScript/qscriptengine.h>
|
|
|
|
#include <glm/glm.hpp>
|
|
#include <glm/gtx/quaternion.hpp>
|
|
|
|
class AudioInjectorOptions {
|
|
public:
|
|
AudioInjectorOptions();
|
|
glm::vec3 position;
|
|
bool positionSet;
|
|
float volume;
|
|
bool loop;
|
|
glm::quat orientation;
|
|
bool stereo;
|
|
bool ambisonic;
|
|
bool ignorePenumbra;
|
|
bool localOnly;
|
|
float secondOffset;
|
|
float pitch; // multiplier, where 2.0f shifts up one octave
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(AudioInjectorOptions);
|
|
|
|
QScriptValue injectorOptionsToScriptValue(QScriptEngine* engine, const AudioInjectorOptions& injectorOptions);
|
|
void injectorOptionsFromScriptValue(const QScriptValue& object, AudioInjectorOptions& injectorOptions);
|
|
|
|
#endif // hifi_AudioInjectorOptions_h
|