diff --git a/src/client/voice/util/VolumeInterface.js b/src/client/voice/util/VolumeInterface.js index 730b141a8..8342393a4 100644 --- a/src/client/voice/util/VolumeInterface.js +++ b/src/client/voice/util/VolumeInterface.js @@ -63,6 +63,24 @@ class VolumeInterface extends EventEmitter { get volume() { return this._volume; } + + /** + * The current volume of the broadcast in decibels + * @readonly + * @type {number} + */ + get volumeDecibels() { + return Math.log10(this._volume) * 20; + } + + /** + * The current volume of the broadcast from a logarithmic scale + * @readonly + * @type {number} + */ + get volumeLogarithmic() { + return Math.pow(this._volume, 1 / 1.660964); + } } module.exports = VolumeInterface;