feat: add band_extract audio source type for frequency band filtering
Some checks failed
Lint & Test / test (push) Failing after 29s

New audio source type that filters a parent source to a specific frequency
band (bass 20-250Hz, mid 250-4kHz, treble 4k-20kHz, or custom range).
Supports chaining with frequency range intersection and cycle detection.
Band filtering applied in both CSS audio streams and test WebSocket.
This commit is contained in:
2026-03-24 19:36:11 +03:00
parent a62e2f474d
commit ae0a5cb160
18 changed files with 512 additions and 66 deletions

View File

@@ -80,6 +80,45 @@
</div>
</div>
<!-- Band Extract fields -->
<div id="audio-source-band-extract-section" style="display:none">
<div class="form-group">
<div class="label-row">
<label for="audio-source-band-parent" data-i18n="audio_source.band_parent">Parent Audio Source:</label>
<button type="button" class="hint-toggle" onclick="toggleHint(this)" title="?" data-i18n-aria-label="aria.hint">?</button>
</div>
<small class="input-hint" style="display:none" data-i18n="audio_source.band_parent.hint">Audio source to extract the frequency band from</small>
<select id="audio-source-band-parent">
<!-- populated dynamically with all audio sources -->
</select>
</div>
<div class="form-group">
<div class="label-row">
<label for="audio-source-band" data-i18n="audio_source.band">Frequency Band:</label>
<button type="button" class="hint-toggle" onclick="toggleHint(this)" title="?" data-i18n-aria-label="aria.hint">?</button>
</div>
<small class="input-hint" style="display:none" data-i18n="audio_source.band.hint">Select a frequency band preset or custom range</small>
<select id="audio-source-band" onchange="onBandPresetChange()">
<option value="bass" data-i18n="audio_source.band.bass">Bass (20250 Hz)</option>
<option value="mid" data-i18n="audio_source.band.mid">Mid (2504000 Hz)</option>
<option value="treble" data-i18n="audio_source.band.treble">Treble (400020000 Hz)</option>
<option value="custom" data-i18n="audio_source.band.custom">Custom Range</option>
</select>
</div>
<div id="audio-source-custom-freq" style="display:none">
<div class="form-group">
<label for="audio-source-freq-low" data-i18n="audio_source.freq_low">Low Frequency (Hz):</label>
<input type="number" id="audio-source-freq-low" min="20" max="20000" value="20" step="1">
</div>
<div class="form-group">
<label for="audio-source-freq-high" data-i18n="audio_source.freq_high">High Frequency (Hz):</label>
<input type="number" id="audio-source-freq-high" min="20" max="20000" value="20000" step="1">
</div>
</div>
</div>
<!-- Description -->
<div class="form-group">
<div class="label-row">