Skip to content
Snippets Groups Projects
Commit 39db0e03 authored by Albert Gräf's avatar Albert Gräf
Browse files

Add support for loading and storing the MIDI API preference (commit 516eba76...

Add support for loading and storing the MIDI API preference (commit 516eba76 from vanilla by aib <aibok42@gmail.com>, slightly edited.
parent 94d15456
No related branches found
No related tags found
No related merge requests found
......@@ -418,6 +418,9 @@ void sys_loadpreferences( void)
callback, blocksize);
/* load MIDI preferences */
if (sys_getpreference("midiapi", prefbuf, MAXPDSTRING)
&& sscanf(prefbuf, "%d", &api) > 0)
sys_set_midi_api(api);
/* JMZ/MB: brackets for initializing */
if (sys_getpreference("nomidiin", prefbuf, MAXPDSTRING) &&
(!strcmp(prefbuf, ".") || !strcmp(prefbuf, "True")))
......@@ -573,6 +576,9 @@ void glob_savepreferences(t_pd *dummy)
sys_putpreference("blocksize", buf1);
/* MIDI settings */
sprintf(buf1, "%d", sys_midiapi);
sys_putpreference("midiapi", buf1);
sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
sys_putpreference("nomidiin", (nmidiindev <= 0 ? "True" : "False"));
/* AG: nmidiin */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment