promote audio.alsa.autoconnect to a more general setting

that could be used across different midi drivers
This commit is contained in:
derselbst 2017-10-26 15:56:27 +02:00
parent 7872f80827
commit 56969332b2
3 changed files with 11 additions and 10 deletions

View file

@ -239,14 +239,6 @@ https://stackoverflow.com/a/6251757
The format of the audio samples. This is currently only an indication; the audio driver may ignore this setting if it can't handle the specified format.
</desc>
</setting>
<setting>
<name>alsa.autoconnect</name>
<type>bool</type>
<def>0 (FALSE)</def>
<desc>
If 1 (TRUE), automatically connects FluidSynth to available ALSA MIDI input ports.
</desc>
</setting>
<setting>
<name>alsa.device</name>
<type>str</type>
@ -412,6 +404,14 @@ https://stackoverflow.com/a/6251757
<midi>
<setting>
<isFirst>MIDI driver settings</isFirst>
<name>autoconnect</name>
<type>bool</type>
<def>0 (FALSE)</def>
<desc>
If 1 (TRUE), automatically connects FluidSynth to available MIDI input ports. alsa_seq is currently the only driver making use of this.
</desc>
</setting>
<setting>
<name>driver</name>
<type>str</type>
<def>alsa_seq (Linux),<br />

View file

@ -150,7 +150,6 @@ static void fluid_alsa_seq_run(void* d);
void fluid_alsa_audio_driver_settings(fluid_settings_t* settings)
{
fluid_settings_register_str(settings, "audio.alsa.device", "default", 0, NULL, NULL);
fluid_settings_register_int(settings, "audio.alsa.autoconnect", 0, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
}
@ -935,7 +934,7 @@ new_fluid_alsa_seq_driver(fluid_settings_t* settings,
}
}
fluid_settings_getint(settings, "audio.alsa.autoconnect", &autoconn_inputs);
fluid_settings_getint(settings, "midi.autoconnect", &autoconn_inputs);
if (autoconn_inputs)
fluid_alsa_seq_autoconnect(dev, port_info);

View file

@ -144,6 +144,8 @@ void fluid_midi_driver_settings(fluid_settings_t* settings)
{
unsigned int i;
fluid_settings_register_int (settings, "midi.autoconnect", 0, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
fluid_settings_register_int (settings, "midi.realtime-prio",
FLUID_DEFAULT_MIDI_RT_PRIO, 0, 99, 0, NULL, NULL);