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:
@@ -718,6 +718,12 @@ class AudioPipeline:
|
||||
ch0 = Send output (to amp input)
|
||||
ch1 = Return output (to amp FX return)
|
||||
"""
|
||||
if audio_in.ndim == 1:
|
||||
# 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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user