Commit 562b018e authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

streamlined audio/midi settings (will eventually replace with Jonathan's preferences)

parent 8f2a732c
......@@ -1477,16 +1477,18 @@ proc menu_addstd {mbar} {
$mbar.audio add command -label {Audio OFF} -accelerator [accel_munge "Ctrl+."] \
-command {menu_audio 0}
match_linux_wm [list $mbar.audio add separator]
$mbar.audio add command -label {Audio Settings} -state disabled
for {set x 1} {$x<[llength $pd_apilist]} {incr x} {
$mbar.audio add radiobutton -label [concat [lindex [lindex $pd_apilist $x] 0] Audio Driver] \
$mbar.audio add radiobutton -label [concat [lindex [lindex $pd_apilist $x] 0] Driver] \
-command {menu_audio 0} -variable pd_whichapi \
-value [lindex [lindex $pd_apilist $x] 1]\
-selectcolor "#dddddd" \
-command {pd [concat pd audio-setapi $pd_whichapi \;]}
}
match_linux_wm [list $mbar.audio add separator]
$mbar.audio add command -label {MIDI Settings} -state disabled
for {set x 0} {$x<[llength $pd_midiapilist]} {incr x} {
$mbar.audio add radiobutton -label [concat [lindex [lindex $pd_midiapilist $x] 0] driver]\
$mbar.audio add radiobutton -label [concat [lindex [lindex $pd_midiapilist $x] 0] Driver]\
-command {menu_midi 0} -variable pd_whichmidiapi \
-value [lindex [lindex $pd_midiapilist $x] 1]\
-selectcolor "#dddddd" \
......
......@@ -509,9 +509,13 @@ void sys_get_midi_apis(char *buf)
{
int n = 0;
strcpy(buf, "{ ");
sprintf(buf + strlen(buf), "{HARDWARE-MIDI %d} ", API_DEFAULT); n++;
#ifndef USEAPI_ALSA
sprintf(buf + strlen(buf), "{OSS %d} ", API_DEFAULT); n++;
#else
n++;
#endif
#ifdef USEAPI_ALSA
sprintf(buf + strlen(buf), "{ALSA-MIDI %d} ", API_ALSA); n++;
sprintf(buf + strlen(buf), "{ALSA %d} ", API_ALSA); n++;
#endif
strcat(buf, "}");
/* then again, if only one API (or none) we don't offer any choice. */
......
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