Audio Monitor doesn't work with PulseAudio to Jack Bridge?

AaronD

Active Member
OBS 28.1.2, installed via PPA
Ubuntu Studio 22.04.1 LTS

When Jack is not running, and all I have is PulseAudio, it seems to work just fine.
But when I start Jack, add a bunch of PulseAudio bridges, and connect the Monitor to one of those bridges, it stays silent.

Taken from a "housekeeping" script, this is the setup code:
Bash:
# QJackCtl is set to start Jack automatically when the app starts, and stop Jack when the app closes
qjackctl &
PID_JACK=$!
sleep 5

INDEX_SINK_0=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_0    client_name=PA_out_0    )
INDEX_SINK_1=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_1    client_name=PA_out_1    )
INDEX_SINK_2=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_2    client_name=PA_out_2    )
INDEX_SINK_3=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_3    client_name=PA_out_3    )
INDEX_SOURCE_0=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_0     client_name=PA_in_0     )
INDEX_SOURCE_1=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_1     client_name=PA_in_1     )
INDEX_SOURCE_2=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_2     client_name=PA_in_2     )
INDEX_SOURCE_3=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_3     client_name=PA_in_3     )
disconnect_all ()
{
    for CONNECTION in $(jack_lsp --connections "$1")
    do
        if [[ "$CONNECTION" = "$1" ]]
        then
            continue
        fi
        jack_disconnect "$1" "$CONNECTION"
    done
}
disconnect_all system:capture_1
disconnect_all system:capture_2
disconnect_all system:playback_1
disconnect_all system:playback_2

PA_DEFAULT_SINK=$(      pactl   get-default-sink    )
PA_DEFAULT_SOURCE=$(    pactl   get-default-source  )
pactl   set-default-sink    PA_out_0
pactl   set-default-source  PA_in_0

# variables here are already set, as a choice of ALSA's available devices
zita-a2j -j MIC0 -d $MIC0 -c $MIC0_CH -r 48000 &
PID_MIC0=$!
zita-j2a -j SPK0 -d $SPK0 -c $SPK0_CH -r 48000 &
PID_SPK0=$!

carla "./$AUDIO_PROCESSING.carxp" &
PID_PROCESSING=$!
sleep 5
And the shutdown code:
Bash:
kill -TERM "$PID_PROCESSING"
sleep 2

kill -TERM "$PID_SPK0"
kill -TERM "$PID_MIC0"
sleep 1

pactl   set-default-sink    "$PA_DEFAULT_SINK"
pactl   set-default-source  "$PA_DEFAULT_SOURCE"

pactl unload-module $INDEX_SOURCE_3
pactl unload-module $INDEX_SOURCE_2
pactl unload-module $INDEX_SOURCE_1
pactl unload-module $INDEX_SOURCE_0
pactl unload-module $INDEX_SINK_3
pactl unload-module $INDEX_SINK_2
pactl unload-module $INDEX_SINK_1
pactl unload-module $INDEX_SINK_0

kill -TERM "$PID_JACK"
In between those snippets, I have this audio processing chain:
Meeting.png

One instance of OBS has its Monitor set to PA_out_1, and another has it set to PA_out_3. Both instances run simultaneously on the same machine, using the --multi flag on the command line:
Bash:
obs --disable-updater --multi --studio-mode --profile "$OBS_PROFILE" --collection "$OBS_PROFILE" --scene "Camera - Selfie" --startvirtualcam > /dev/null &
PID_MASTER=$!
sleep 10
obs --disable-updater --multi --studio-mode --profile "Meeting_Slave" --collection "Meeting_Slave" --scene "Camera" > /dev/null &
PID_SLAVE=$!
sleep 10
  • OBS Master takes PA_in_1 as the live mics, and produces a "normal" broadcast to feed to a remote meeting.
  • The meeting uses PA_in_2 and PA_out_2 for its audio connections.
  • OBS Slave takes PA_in_1|2|3 to produce a local display and a recording, that includes the meeting participants when appropriate, both local and remote, and the featured content otherwise, that was sent to the remote people. The automation that does that is outside the scope of this thread.
I know that OBS's output is silent because everything in Carla has an input meter and an output meter. Nothing connected to OBS's outputs lights up, even temporary things added solely for testing, but other connections do, like the mic processing before it gets to OBS.

I hope I'm missing something obvious, but I can't think of what it might be.

This is the Master's Global Audio:
Master Audio.png

I've always thought that using the "wrong" set of names for the Monitoring list was an inconsequential bug, and that it really does use the correct set of devices. And that understanding did seem to work in previous versions of this rig. Apparently not anymore?

Log from Master instance, matching the audio settings above:
 

AaronD

Active Member
I have no idea what I did, but it works now. The best I can guess is a "brain fart" with these settings, but I can't confirm that:
1669744902178.png
 
Top