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:
- Request 2 channels, get 2 channels
- Request 32 channels, get 32 (regardless if the default device has less)
- Ability to enable or disable autoconnecting to the default device
Details
With this config
ma_device_config deviceConfig = ma_device_config_init(ma_device_type_playback);
deviceConfig.playback.format = ma_format_f32;
deviceConfig.playback.channels = 2;
deviceConfig.sampleRate = 48000.0f;
The result is:

Proposed solution
Number of channels
- Since in device config the
.playback.channels is ignored for jack, then I suggest if it is default 0 to use the number of channels in the default device.
- If
.playback.channels is non-zero, then in ma_device_init__jack() simply create as many channels with (ma_jack_port_register_proc)() instead of basing it off the default device specs.
Autoconnect
- in the context config add a
.jack.autoconnect setting
- in
ma_device_start__jack() don't do calls to (ma_jack_connect_proc)() if .jack.autoconnect is false
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:

Proposed solution
Number of channels
.playback.channelsis ignored for jack, then I suggest if it is default 0 to use the number of channels in the default device..playback.channelsis 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.autoconnectsettingma_device_start__jack()don't do calls to(ma_jack_connect_proc)()if.jack.autoconnectis false