From 9805506cf29a5739b7530b3a91ad647d5a639230 Mon Sep 17 00:00:00 2001 From: Trek H Date: Sat, 14 Sep 2019 20:28:59 +0930 Subject: [PATCH] audio-player: changed syntax --- cmd/audio-player/adpcm.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/audio-player/adpcm.js b/cmd/audio-player/adpcm.js index 958a295c..d87e4d70 100644 --- a/cmd/audio-player/adpcm.js +++ b/cmd/audio-player/adpcm.js @@ -49,13 +49,13 @@ const stepTable = [ 32767 ]; -const byteDepth = 2, // We are working with 16-bit samples. TODO(Trek): make configurable. - headSize = 8, // Number of bytes in the header of ADPCM. - chunkLenSize = 4; +const byteDepth = 2; // We are working with 16-bit samples. TODO(Trek): make configurable. +const headSize = 8; // Number of bytes in the header of ADPCM. +const chunkLenSize = 4; -let est = 0, // Estimation of sample based on quantised ADPCM nibble. - idx = 0, // Index to step used for estimation. - step = 0; +let est = 0; // Estimation of sample based on quantised ADPCM nibble. +let idx = 0; // Index to step used for estimation. +let step = 0; // decodeSample takes 4 bits which represents a single ADPCM nibble, and returns a 16 bit decoded PCM sample. function decodeSample(nibble) {