Open digitalsignalperson opened 1 month ago
Thanks. I don't have a whole lot of experience with jack, but everything you mentioned here makes sense. I'm actually surprised it's not already doing the channel count thing. Just on the autoconnect thing, if jack.autoconnect
is false, I wouldn't do any jack_connect()
at all? Does that not need to be called at some point in order for audio to actually work?
@mackron correct, I have it working without calling jack_connect()
at all. See #852
Current behavior:
My default device has 8 channels. If I request 2 channels it creates a jack device with 8 outputs and auto-connect them all.
Desired behavior:
Details
With this config
The result is:![image](https://github.com/mackron/miniaudio/assets/45611618/41027ed8-9baa-4717-82a4-8e34a848614c)
Proposed solution
Number of channels
.playback.channels
is ignored for jack, then I suggest if it is default 0 to use the number of channels in the default device..playback.channels
is non-zero, then inma_device_init__jack()
simply create as many channels with(ma_jack_port_register_proc)()
instead of basing it off the default device specs.Autoconnect
.jack.autoconnect
settingma_device_start__jack()
don't do calls to(ma_jack_connect_proc)()
if.jack.autoconnect
is false