Add Users.setInjectorGain() and Users.getInjectorGain() to the scripting interface

This commit is contained in:
Ken Cooke 2019-03-20 15:48:05 -07:00 committed by Wayne Chen
parent 755762e8ec
commit 4a6e495f5f
2 changed files with 24 additions and 0 deletions

View file

@ -51,6 +51,15 @@ float UsersScriptingInterface::getAvatarGain(const QUuid& nodeID) {
return DependencyManager::get<NodeList>()->getAvatarGain(nodeID);
}
void UsersScriptingInterface::setInjectorGain(float gain) {
// ask the NodeList to set the audio injector gain
DependencyManager::get<NodeList>()->setInjectorGain(gain);
}
float UsersScriptingInterface::getInjectorGain() {
return DependencyManager::get<NodeList>()->getInjectorGain();
}
void UsersScriptingInterface::kick(const QUuid& nodeID) {
if (_kickConfirmationOperator) {

View file

@ -97,6 +97,21 @@ public slots:
*/
float getAvatarGain(const QUuid& nodeID);
/**jsdoc
* Sets the audio injector gain at the server.
* Units are Decibels (dB)
* @function Users.setInjectorGain
* @param {number} gain (in dB)
*/
void setInjectorGain(float gain);
/**jsdoc
* Gets the audio injector gain at the server.
* @function Users.getInjectorGain
* @returns {number} gain (in dB)
*/
float getInjectorGain();
/**jsdoc
* Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if
* available) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in.