diff --git a/public/audio.js b/public/audio.js
index d3f0017b..74e631ab 100644
--- a/public/audio.js
+++ b/public/audio.js
@@ -73,10 +73,7 @@
// === Core: Initialize audio context ===
function initAudio() {
- if (audioCtx) {
- if (audioCtx.state === 'suspended') audioCtx.resume();
- return;
- }
+ if (audioCtx) return;
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
masterGain = audioCtx.createGain();
masterGain.gain.value = 0.3;
@@ -86,13 +83,11 @@
// === Core: Sonify a single packet ===
function sonifyPacket(pkt) {
- console.log('[audio] sonifyPacket called, enabled:', audioEnabled, 'ctx:', audioCtx?.state, 'voices:', activeVoices);
if (!audioEnabled || !audioCtx) return;
- if (activeVoices >= MAX_VOICES) return;
+ if (activeVoices >= MAX_VOICES) return; // voice stealing: just drop
const rawHex = pkt.raw || pkt.raw_hex || (pkt.packet && pkt.packet.raw_hex) || '';
- console.log('[audio] rawHex len:', rawHex.length, 'first20:', rawHex.slice(0, 20));
- if (!rawHex || rawHex.length < 6) return;
+ if (!rawHex || rawHex.length < 6) return; // need at least 3 bytes
// Parse raw hex to byte array
const allBytes = [];
diff --git a/public/index.html b/public/index.html
index 46a16148..5c85ad06 100644
--- a/public/index.html
+++ b/public/index.html
@@ -22,7 +22,7 @@
-
+
-
-
+
+
diff --git a/public/live.js b/public/live.js
index 2da7b6d4..2d3a42c0 100644
--- a/public/live.js
+++ b/public/live.js
@@ -1484,7 +1484,6 @@
if (showOnlyFavorites && !packets.some(p => packetInvolvesFavorite(p))) return;
playSound(typeName);
- if (window.MeshAudio) MeshAudio.sonifyPacket(first);
// Rain drop per observation in the group
packets.forEach((p, i) => setTimeout(() => addRainDrop(p), i * 150));