summaryrefslogtreecommitdiff
path: root/client/lib
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2025-07-07 12:13:51 +0200
committerjulian laplace <julescarbon@gmail.com>2025-07-07 12:13:51 +0200
commit966e3b080f039fa1c62113e75e1e1481d7e19439 (patch)
treed9b2145cf07ba64101be9ec62c83a947fdb3e720 /client/lib
parent784bf3ff435f5236c8d32e90cedd1a1e488c9159 (diff)
trigger index
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/util.js10
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,
+};