When routing mode is '4cm' but JACK provides mono audio (1D array), the _process_4cm method crashes with IndexError on audio_in[0,:]. Treat mono input as guitar channel with silent return channel. This happens when JACK is configured with 1 capture port (mono mode) but routing_mode is set to '4cm' — e.g. after a settings sweep that toggles routing_mode without changing JACK port config.
This commit is contained in:
+8
-2
@@ -718,8 +718,14 @@ class AudioPipeline:
|
|||||||
ch0 = Send output (to amp input)
|
ch0 = Send output (to amp input)
|
||||||
ch1 = Return output (to amp FX return)
|
ch1 = Return output (to amp FX return)
|
||||||
"""
|
"""
|
||||||
ch0 = audio_in[0, :].copy()
|
if audio_in.ndim == 1:
|
||||||
ch1 = audio_in[1, :].copy()
|
# Mono input in 4CM mode — treat entire input as guitar
|
||||||
|
# channel, create silent return channel
|
||||||
|
ch0 = audio_in.copy()
|
||||||
|
ch1 = np.zeros_like(audio_in)
|
||||||
|
else:
|
||||||
|
ch0 = audio_in[0, :].copy()
|
||||||
|
ch1 = audio_in[1, :].copy()
|
||||||
|
|
||||||
# ── 60Hz mains hum notch filter on both channels ────────────
|
# ── 60Hz mains hum notch filter on both channels ────────────
|
||||||
b0, b1, b2 = self._notch_b0, self._notch_b1, self._notch_b2
|
b0, b1, b2 = self._notch_b0, self._notch_b1, self._notch_b2
|
||||||
|
|||||||
Reference in New Issue
Block a user