summaryrefslogtreecommitdiff
path: root/muse2/muse/driver
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2012-01-03 17:26:09 +0000
committerFlorian Jung <flo@windfisch.org>2012-01-03 17:26:09 +0000
commit1bc4ba9dfc00b6e7511fbf4765296a2002f83315 (patch)
treedf6a0d5d9b61d64005dd368afea0aea11ab0a6b3 /muse2/muse/driver
parentb988a0a27bc175ce10bc8fa53ed131486813f3e7 (diff)
merged with release_2_0
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r--muse2/muse/driver/alsamidi.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp
index 2c6f9468..740de1fb 100644
--- a/muse2/muse/driver/alsamidi.cpp
+++ b/muse2/muse/driver/alsamidi.cpp
@@ -792,8 +792,9 @@ bool initMidiAlsa()
const char* cname = snd_seq_client_info_get_name(cinfo);
//printf( "ALSA client name: %s\n", cname);
- // Put Midi Through and user clients after others. Insert other unwanted clients here: // p4.0.41
- if( !(snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT || strcmp("Midi Through", cname) == 0) )
+ bool is_thru = (strcmp("Midi Through", cname) == 0);
+ // Put Midi Through and user clients after others. Insert other unwanted clients here: // p4.0.41
+ if( !(snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT || is_thru) )
continue;
snd_seq_port_info_t *pinfo;
@@ -820,6 +821,8 @@ bool initMidiAlsa()
if (capability & inCap)
flags |= 2;
dev->setrwFlags(flags);
+ if(is_thru) // Don't auto-open Midi Through.
+ dev->setOpenFlags(0);
if (MusEGlobal::debugMsg)
printf("ALSA port add: <%s>, %d:%d flags %d 0x%0x\n",
snd_seq_port_info_get_name(pinfo),