From 09e371ba93b0e0f010cb1764aeabaff1fcccc305 Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 14 May 2022 12:37:11 -0400 Subject: [PATCH] cwIoMidiRecordPlay.cpp : Do not initialize disabled MIDI devices. --- cwIoMidiRecordPlay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cwIoMidiRecordPlay.cpp b/cwIoMidiRecordPlay.cpp index a1a2f96..387962f 100644 --- a/cwIoMidiRecordPlay.cpp +++ b/cwIoMidiRecordPlay.cpp @@ -862,10 +862,12 @@ cw::rc_t cw::midi_record_play::create( handle_t& hRef, io::handle_t ioH, const o p->halfPedalMidiPedalVel = 127; - for( unsigned i=0; i< - p->midiDevN; ++i) + for( unsigned i=0; imidiDevN; ++i) { midi_device_t* dev = p->midiDevA + i; + + if( !p->midiDevA[i].enableFl ) + continue; if((dev->midiOutDevIdx = io::midiDeviceIndex(p->ioH,dev->midiOutDevLabel)) == kInvalidIdx ) {