mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
add Audio.context
This commit is contained in:
parent
2b99f299c8
commit
67288528da
2 changed files with 14 additions and 2 deletions
|
@ -11,4 +11,11 @@
|
|||
|
||||
#include "Audio.h"
|
||||
|
||||
using namespace scripting;
|
||||
using namespace scripting;
|
||||
|
||||
static const QString DESKTOP_CONTEXT { "Desktop" };
|
||||
static const QString HMD_CONTEXT { "VR" };
|
||||
|
||||
QString Audio::getContext() {
|
||||
return _contextIsHMD ? HMD_CONTEXT : DESKTOP_CONTEXT;
|
||||
}
|
|
@ -26,7 +26,7 @@ class Audio : public AudioScriptingInterface {
|
|||
// TODO: Q_PROPERTY(bool reverb)
|
||||
// TODO: Q_PROPERTY(float inputVolume)
|
||||
// TODO: Q_PROPERTY(bool showMicLevel)
|
||||
// TODO: Q_PROPERTY(QString context)
|
||||
Q_PROPERTY(QString context READ getContext NOTIFY changedContext)
|
||||
Q_PROPERTY(AudioDevices* devices READ getDevices NOTIFY nop)
|
||||
|
||||
public:
|
||||
|
@ -34,13 +34,18 @@ public:
|
|||
|
||||
signals:
|
||||
void nop();
|
||||
void changedContext(QString);
|
||||
|
||||
protected:
|
||||
Audio() {}
|
||||
|
||||
QString getContext();
|
||||
|
||||
private:
|
||||
AudioDevices* getDevices() { return &_devices; }
|
||||
AudioDevices _devices;
|
||||
|
||||
bool _contextIsHMD { false };
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue