mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-08 00:31:50 +00:00
Revert audio fixes — restore to initial working audio commit (cf3964a)
This commit is contained in:
+3
-8
@@ -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 = [];
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@
|
||||
<meta name="twitter:title" content="MeshCore Analyzer">
|
||||
<meta name="twitter:description" content="Real-time MeshCore LoRa mesh network analyzer — live packet visualization, node tracking, channel decryption, and route analysis.">
|
||||
<meta name="twitter:image" content="https://raw.githubusercontent.com/Kpa-clawbot/meshcore-analyzer/master/public/og-image.png">
|
||||
<link rel="stylesheet" href="style.css?v=1774171176">
|
||||
<link rel="stylesheet" href="style.css?v=1774172118">
|
||||
<link rel="stylesheet" href="home.css">
|
||||
<link rel="stylesheet" href="live.css?v=1774058575">
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
|
||||
@@ -90,8 +90,8 @@
|
||||
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="traces.js?v=1774135052" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="audio.js?v=1774172027" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="live.js?v=1774171793" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="audio.js?v=1774172118" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="live.js?v=1774172118" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="observers.js?v=1774290000" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="observer-detail.js?v=1774028201" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="node-analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user