midi: clean and prepare compatibility with prebuilt midi plugin

This commit is contained in:
bordun 2020-07-27 17:11:01 +02:00
parent d2b00e9e36
commit 219403f33e
5 changed files with 29 additions and 20 deletions

View file

@ -13,7 +13,7 @@ try:
from rtmidi.midiconstants import *
API = rtmidi.API_UNIX_JACK if 'jack' in argv else rtmidi.API_UNSPECIFIED
if API is rtmidi.API_UNIX_JACK and rtmidi.API_UNIX_JACK not in rtmidi.get_compiled_api():
if API == rtmidi.API_UNIX_JACK and rtmidi.API_UNIX_JACK not in rtmidi.get_compiled_api():
API = rtmidi.API_UNSPECIFIED
ipc_send('log', '(ERROR, MIDI) python-rtmidi was not compiled with jack midi support, falling back to default API')