diff options
author | Chris Xiong <chirs241097@gmail.com> | 2020-01-11 23:26:03 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2020-01-11 23:26:03 +0800 |
commit | f7f2e9039cfd6c3d07a28137e321fa96b0267084 (patch) | |
tree | 1fd53d58a388b575881dce827520b3a8d6984fbb /core | |
parent | 12ad6495fa332ea499485082272f796c4b08c83c (diff) | |
download | QMidiPlayer-f7f2e9039cfd6c3d07a28137e321fa96b0267084.tar.xz |
Code refactoring for qmpChannelEditor.
Do not crash if preset selection dialog is closed with no preset selected.
More translatable strings in qmpChannelEditor.
Diffstat (limited to 'core')
-rw-r--r-- | core/qmpmidiplay.cpp | 2 | ||||
-rw-r--r-- | core/qmpmidiplay.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index c24b0c9..4cb5430 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -450,7 +450,7 @@ void CMidiPlayer::setSolo(int ch,bool s) {setBit(solo,ch,s?1:0);} bool CMidiPlayer::getChannelMask(int ch) {return((mute>>ch)&1)||(solo&&!((solo>>ch)&1));} -int CMidiPlayer::getCC(int ch,int id) +uint16_t CMidiPlayer::getCC(int ch,int id) { if(chstatus[ch][id]==0xff) return getChannelOutputDevice(ch)->getInitialCCValue(uint8_t(id),uint8_t(ch)); diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp index c3833a5..2fd81a0 100644 --- a/core/qmpmidiplay.hpp +++ b/core/qmpmidiplay.hpp @@ -146,7 +146,7 @@ class CMidiPlayer void setMute(int ch,bool m); void setSolo(int ch,bool s); bool getChannelMask(int ch); - int getCC(int ch,int id); + uint16_t getCC(int ch,int id); void setCC(int ch,int id,int val); qmpMidiOutFluid* fluid(); |