Keep grid panning for mono/left/right radio modes
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
// Maintainer-controlled web client version.
|
// Maintainer-controlled web client version.
|
||||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||||
window.CHGRID_WEB_VERSION = "2026.02.21 R79";
|
window.CHGRID_WEB_VERSION = "2026.02.21 R80";
|
||||||
|
|||||||
@@ -685,7 +685,6 @@ function updateRadioStationSpatialAudio(): void {
|
|||||||
const normalizedVolume = Number.isFinite(volume) ? Math.max(0, Math.min(100, volume)) / 100 : 0.5;
|
const normalizedVolume = Number.isFinite(volume) ? Math.max(0, Math.min(100, volume)) / 100 : 0.5;
|
||||||
const effect = normalizeRadioEffect(item.params.effect);
|
const effect = normalizeRadioEffect(item.params.effect);
|
||||||
const effectValue = normalizeRadioEffectValue(item.params.effectValue);
|
const effectValue = normalizeRadioEffectValue(item.params.effectValue);
|
||||||
const channel = normalizeRadioChannel(item.params.channel);
|
|
||||||
applyRadioEffect(output, audioCtx, effect, effectValue);
|
applyRadioEffect(output, audioCtx, effect, effectValue);
|
||||||
if (!streamUrl || !enabled) {
|
if (!streamUrl || !enabled) {
|
||||||
output.gain.gain.linearRampToValueAtTime(0, audioCtx.currentTime + 0.05);
|
output.gain.gain.linearRampToValueAtTime(0, audioCtx.currentTime + 0.05);
|
||||||
@@ -704,10 +703,7 @@ function updateRadioStationSpatialAudio(): void {
|
|||||||
}
|
}
|
||||||
output.gain.gain.linearRampToValueAtTime(gainValue * normalizedVolume, audioCtx.currentTime + 0.1);
|
output.gain.gain.linearRampToValueAtTime(gainValue * normalizedVolume, audioCtx.currentTime + 0.1);
|
||||||
if (output.panner) {
|
if (output.panner) {
|
||||||
let resolvedPan = Math.max(-1, Math.min(1, panValue));
|
const resolvedPan = Math.max(-1, Math.min(1, panValue));
|
||||||
if (channel !== 'stereo') {
|
|
||||||
resolvedPan = 0;
|
|
||||||
}
|
|
||||||
output.panner.pan.linearRampToValueAtTime(resolvedPan, audioCtx.currentTime + 0.1);
|
output.panner.pan.linearRampToValueAtTime(resolvedPan, audioCtx.currentTime + 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user