Commit 04670509 authored by Jonathan Wilkes's avatar Jonathan Wilkes

Merge branch 'pranay_36/purr-data-pd-l2ork_port_midi'

parents 2784e336 0be9d17b
......@@ -666,14 +666,7 @@ void midi_alsa_setndevs(int in, int out);
void glob_midi_setapi(void *dummy, t_floatarg f)
{
int newapi = f;
if (newapi)
{
if (newapi == sys_midiapi)
{
//if (!midi_isopen())
// s_reopen_midi();
}
else
if (newapi != sys_midiapi)
{
#ifdef USEAPI_ALSA
if (sys_midiapi == API_ALSA)
......@@ -682,22 +675,12 @@ void glob_midi_setapi(void *dummy, t_floatarg f)
#endif
sys_close_midi();
sys_midiapi = newapi;
/* bash device params back to default */
// midi_nmidiindev = midi_nmidioutdev = 1;
//midi_midiindev[0] = midi_midioutdev[0] = DEFAULTMIDIDEV;
//midi_midichindev[0] = midi_midichoutdev[0] = SYS_DEFAULTCH;
sys_reopen_midi();
}
#ifdef USEAPI_ALSA
midi_alsa_setndevs(midi_nmidiindev, midi_nmidioutdev);
#endif
glob_midi_properties(0, 0);
}
else //if (midi_isopen())
{
sys_close_midi();
//midi_state = 0;
}
glob_midi_properties(0, (midi_nmidiindev > 1 || midi_nmidioutdev > 1));
}
extern t_class *glob_pdobject;
......@@ -808,9 +791,9 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
if (sys_midiapi == API_ALSA)
{
// sprintf(buf,
//"pdtk_alsa_midi_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d 1\n",
// "pdtk_alsa_midi_dialog %%s "
// "%d %d %d %d %d %d %d %d "
// "%d 1\n",
// midiindev1, midiindev2, midiindev3, midiindev4,
// midioutdev1, midioutdev2, midioutdev3, midioutdev4,
// (flongform != 0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment