It appears that the $sndio_server variable is not actually used. I think it should be used in $MON_IN, though it appears that using snd/mon is roughly equivalent. That said, in my testing, using snd/mon instead of snd/${sndio_server}.mon will not fail if the mon sub-device doesn't exist on the server device and will silently result is no audio (no pun intended). However, using snd/${sndio_server} will result in an error if the mon` sub-device doesn't exist:
[sndio @ 0x15d51a56800] Could not open sndio device
snd/0.mon: Input/output error
I think the error would be preferable if one is trying to record a monitor mix and haven't correctly configured sndiod(8).
UPDATE: It appears that sndiod(8) sub-device naming has changed sometime since OpenBSD 7.5 (see 7.5's sndiod(8) vs 7.6's sndiod(8) manual pages), so a monitor sub-device would be accessed as snd/mon instead of snd/0.mon. At least, the manual pages changed, so I need to re-research & test which method is correct (or are both still valid?)
On a related note, I noticed that the "monitor only" recording doesn't utilize either the $volume_mon (as specified with -vmon <volume>) or the volume variable, so you can't control the volume for a monitor-only stream.
Furthermore, the $volume variable is actually not used anywhere. I'd suggest dropping the $volume variable (specified with -v <volume>) and using $volume_mon in monitor-only recordings.
It appears that the
$sndio_servervariable is not actually used. I think it should be used in$MON_IN, though it appears that usingsnd/monis roughly equivalent. That said, in my testing, usingsnd/moninstead ofsnd/${sndio_server}.monwill not fail if themonsub-device doesn't exist on the server device and will silently result is no audio (no pun intended). However, usingsnd/${sndio_server} will result in an error if themon` sub-device doesn't exist:I think the error would be preferable if one is trying to record a monitor mix and haven't correctly configured sndiod(8).
UPDATE: It appears that sndiod(8) sub-device naming has changed sometime since OpenBSD 7.5 (see 7.5's sndiod(8) vs 7.6's sndiod(8) manual pages), so a monitor sub-device would be accessed as
snd/moninstead ofsnd/0.mon. At least, the manual pages changed, so I need to re-research & test which method is correct (or are both still valid?)On a related note, I noticed that the "monitor only" recording doesn't utilize either the
$volume_mon(as specified with-vmon <volume>) or thevolumevariable, so you can't control the volume for a monitor-only stream.Furthermore, the
$volumevariable is actually not used anywhere. I'd suggest dropping the$volumevariable (specified with-v <volume>) and using$volume_monin monitor-only recordings.