diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-11 09:24:45 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-11 09:24:45 +0000 |
commit | cc0f3b0c95731d250abce96c98879932f24a8e8d (patch) | |
tree | d3a2ecb494ce06e37739d6e3b0610ad2eb0ebfc1 | |
parent | aae64c142b4492c4613f483e0d961897deb06233 (diff) |
Fix bitmap2String(). Default channel 16 wasn't working.
-rw-r--r-- | muse2/muse/confmport.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/widgets/utils.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index 30318f03..b95db28d 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -65,7 +65,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) int no = atoi(id.toLatin1().constData()) - 1; if(no < 0 || no >= MIDI_PORTS) return; - midiPorts[no].setDefaultInChannels(string2bitmap(s)); + midiPorts[no].setDefaultInChannels(((1 << MIDI_CHANNELS) - 1) & string2bitmap(s)); song->update(); } break; @@ -75,7 +75,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) int no = atoi(id.toLatin1().constData()) - 1; if(no < 0 || no >= MIDI_PORTS) return; - midiPorts[no].setDefaultOutChannels(string2bitmap(s)); + midiPorts[no].setDefaultOutChannels(((1 << MIDI_CHANNELS) - 1) & string2bitmap(s)); song->update(); } break; diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp index 083ae3d3..ddcc63c5 100644 --- a/muse2/muse/widgets/utils.cpp +++ b/muse2/muse/widgets/utils.cpp @@ -94,8 +94,8 @@ QString bitmap2String(int bm) int first = 0; bool needSpace = false; bm &= 0xffff; - //for (int i = 0; i < 17; ++i) { - for (int i = 0; i < 16; ++i) { + for (int i = 0; i < 17; ++i) { + //for (int i = 0; i < 16; ++i) { if ((1 << i) & bm) { if (!range) { range = true; |