Browse Source

Set default MIDI port according to selected backend

master
Damien Goutte-Gattat 9 years ago
parent
commit
c58b06961e
  1. 9
      configure.ac
  2. 2
      src/asysex.c

9
configure.ac

@ -20,16 +20,21 @@ ICP_CHECK_NOTCH_FUNCS
dnl Choice of MIDI backend
midi_backend=
midi_default_port=
AC_ARG_WITH([alsa],
[AS_HELP_STRING([--with-alsa],
[use ALSA MIDI backend])],
[AS_IF([test "x$with_alsa" = xyes],
[midi_backend=alsa])])
[midi_backend=alsa
midi_default_port="hw:1,0,0"])])
AC_ARG_WITH([oss],
[AS_HELP_STRING([--with-oss],
[use OSS MIDI backend])],
[AS_IF([test "x$with_oss" = xyes],
[midi_backend=oss])])
[midi_backend=oss
midi_default_port="/dev/midi00"])])
AC_DEFINE_UNQUOTED([DEFAULT_MIDI_PORT], ["$midi_default_port"],
[Default MIDI port to use.])
dnl Check for selected backend
AS_CASE(["x$midi_backend"],

2
src/asysex.c

@ -279,7 +279,7 @@ main(int argc, char **argv)
setlocale(LC_ALL, "");
atexit(cleanup);
port = "hw:1,0,0";
port = DEFAULT_MIDI_PORT;
mode = ASYSEX_MODE_QUERY;
print_midi = print_midi_hex;

Loading…
Cancel
Save