From fa879cee9d2337e3d139e7016fb75d8b4bf1545b Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 18 Apr 2017 17:59:37 -0400 Subject: [PATCH] Fix `static` getters Thanks @ericrosenbaum! --- src/ADPCMSoundDecoder.js | 8 ++++---- src/index.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ADPCMSoundDecoder.js b/src/ADPCMSoundDecoder.js index 7c39a28..b8198e5 100644 --- a/src/ADPCMSoundDecoder.js +++ b/src/ADPCMSoundDecoder.js @@ -14,7 +14,7 @@ class ADPCMSoundDecoder { * Data used by the decompression algorithm * @type {Array} */ - static get stepTable () { + static get STEP_TABLE () { return [ 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, @@ -29,7 +29,7 @@ class ADPCMSoundDecoder { * Data used by the decompression algorithm * @type {Array} */ - static get indexTable () { + static get INDEX_TABLE () { return [ -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 @@ -148,14 +148,14 @@ class ADPCMSoundDecoder { code = (lastByte >> 4) & 0xF; lastByte = -1; } - step = this.stepTable[index]; + step = ADPCMSoundDecoder.STEP_TABLE[index]; delta = 0; if (code & 4) delta += step; if (code & 2) delta += step >> 1; if (code & 1) delta += step >> 2; delta += step >> 3; // compute next index - index += this.indexTable[code]; + index += ADPCMSoundDecoder.INDEX_TABLE[code]; if (index > 88) index = 88; if (index < 0) index = 0; // compute and output sample diff --git a/src/index.js b/src/index.js index 3b440ac..bb544b0 100644 --- a/src/index.js +++ b/src/index.js @@ -208,7 +208,7 @@ class AudioEngine { * Names of the audio effects. * @enum {string} */ - static get EFFECT_NAMES () { + get EFFECT_NAMES () { return { pitch: 'pitch', pan: 'pan',