diff options
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r-- | qmidiplayer-desktop/qmpchanneleditor.cpp | 7 | ||||
-rw-r--r-- | qmidiplayer-desktop/qmppresetselect.cpp | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpchanneleditor.cpp b/qmidiplayer-desktop/qmpchanneleditor.cpp index 71dd455..fbe3d50 100644 --- a/qmidiplayer-desktop/qmpchanneleditor.cpp +++ b/qmidiplayer-desktop/qmpchanneleditor.cpp @@ -26,7 +26,12 @@ void qmpChannelEditor::setupWindow(int chid) setWindowTitle(tr("Channel Parameter Editor - Channel #%1").arg(ch+1)); CMidiPlayer* player=qmpMainWindow::getInstance()->getPlayer(); uint16_t b;uint8_t p;std::string pstn; - player->getChannelOutputDevice(ch)->getChannelPreset(ch,&b,&p,pstn); + if(!player->getChannelOutputDevice(ch)->getChannelPreset(ch,&b,&p,pstn)) + { + b=player->getCC(ch,0)<<7|player->getCC(ch,32); + p=player->getCC(ch,128); + pstn=player->getChannelOutputDevice(ch)->getPresetName(b,p); + } ui->lbPresetName->setText(pstn.c_str()); sprintf(str,"BK: %03d",b);ui->lbBank->setText(str); sprintf(str,"PC: %03d",p);ui->lbPreset->setText(str); diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp index 6683e49..578ae1d 100644 --- a/qmidiplayer-desktop/qmppresetselect.cpp +++ b/qmidiplayer-desktop/qmppresetselect.cpp @@ -112,7 +112,6 @@ void qmpPresetSelector::on_lwPresetSelect_itemDoubleClicked() void qmpPresetSelector::on_lwBankSelect_currentRowChanged() { - fprintf(stderr,"bs cr changed\n"); ui->lwPresetSelect->clear(); if(!ui->lwBankSelect->currentItem())return; char name[256];int b; |