diff options
Diffstat (limited to 'client/lib/util.js')
| -rw-r--r-- | client/lib/util.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js index 8696a50..5bf93dc 100644 --- a/client/lib/util.js +++ b/client/lib/util.js @@ -26,6 +26,7 @@ function mod(n, m) { function roundFreq(freq) { return Math.round(freq * 100); } +const frequencyInRange = (freq) => 20 < freq && freq < 15000; function requestAudioContext(fn) { if (window.location.protocol !== "https:") { @@ -70,4 +71,11 @@ function requestAudioContext(fn) { } } -export { choice, mod, browser, roundFreq, requestAudioContext }; +export { + choice, + mod, + browser, + roundFreq, + frequencyInRange, + requestAudioContext, +}; |
