From a97307ba6e625468a1d8ad1049e6d9db0ad42d4d Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 21 Jun 2017 21:32:35 +0800 Subject: Fixed FTBFS on Windows. Fixed the default output device option. Seeking now restores CC values correctly. --- ChangeLog | 5 +++++ core/qmpmidiplay.cpp | 11 ++++++++++- qmidiplayer-desktop/qmidiplayer-desktop.pro | 2 +- qmidiplayer-desktop/qmpchannelswindow.cpp | 2 +- qmidiplayer-desktop/qmpmainwindow.cpp | 5 +++-- qmidiplayer-lite/qmidiplayer-lite.pro | 2 +- visualization/qmpvisualization.cpp | 2 +- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c1f7dca..d749d78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-06-21 0.8.6 indev +Fixed FTBFS on Windows. +Fixed the default output device option. +Seeking now restores CC values correctly. + 2017-06-21 0.8.6 indev Fixed a bunch of bugs and crashes in the RtMidi output device. diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp index e758457..c3df381 100644 --- a/core/qmpmidiplay.cpp +++ b/core/qmpmidiplay.cpp @@ -6,6 +6,7 @@ #include #include "qmpmidiplay.hpp" #ifdef _WIN32 +#define NOMINMAX #include uint64_t pf; #endif @@ -347,11 +348,19 @@ void CMidiPlayer::setTCeptr(uint32_t ep,uint32_t st) if(ep==ecnt)tcstop=1;else tceptr=ep; for(int i=0;i<16;++i) { + qmpMidiOutDevice* dest=mididev[mappedoutput[i]].dev; for(int j=0;j<120;++j) - internalFluid->basicMessage(0xB0|i,j,ccstamps[st][i][j]); + { + internalFluid->basicMessage(0xB0|i,j,ccstamps[st][i][j]); + dest->basicMessage(0xB0|i,j,ccstamps[st][i][j]); + chstatus[i][j]=ccstamps[st][i][j]; + } internalFluid->basicMessage(0xC0|i,ccstamps[st][i][128],0); + dest->basicMessage(0xC0|i,ccstamps[st][i][128],0); + chstatus[i][128]=ccstamps[st][i][128]; //fluid_synth_pitch_bend(synth,i,ccstamps[st][i][130]); internalFluid->rpnMessage(i,0,ccstamps[st][i][134]<<7); + dest->rpnMessage(i,0,ccstamps[st][i][134]<<7); pbr[i]=ccstamps[st][i][134]; dpt=ccstamps[st][0][131];ctempo=dpt*divs/1000; ctsn=ccstamps[st][0][132]>>24;ctsd=1<<((ccstamps[st][0][132]>>16)&0xFF); diff --git a/qmidiplayer-desktop/qmidiplayer-desktop.pro b/qmidiplayer-desktop/qmidiplayer-desktop.pro index 74317c2..9b0928c 100644 --- a/qmidiplayer-desktop/qmidiplayer-desktop.pro +++ b/qmidiplayer-desktop/qmidiplayer-desktop.pro @@ -112,7 +112,7 @@ unix{ win32{ DEFINES += RT_MIDI_H=\\\"RtMidi.h\\\" #change these before building... - LIBS += e:/libs/fluidsynth/fluidsynth.lib winmm.lib + LIBS += e:/libs/fluidsynth/libfluidsynth.dll.a winmm.lib Release:LIBS += e:/libs/rtmidi/rtmidi.lib Debug:LIBS += e:/libs/rtmidi/rtmidid.lib INCLUDEPATH += e:/libs/fluidsynth/include diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp index 0626697..cdbb607 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.cpp +++ b/qmidiplayer-desktop/qmpchannelswindow.cpp @@ -28,7 +28,7 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent) : qmpSettingsWindow::getDefaultOutWidget()->addItem(devs[i].c_str()); if(!QString(devs[i].c_str()).compare(qmpSettingsWindow::getSettingsIntf()-> value("Midi/DefaultOutput","Internal FluidSynth").toString())) - qmpSettingsWindow::getDefaultOutWidget()->setCurrentIndex(i+1); + qmpSettingsWindow::getDefaultOutWidget()->setCurrentIndex(i); } qmpSettingsWindow::getSettingsIntf()->setValue("Midi/DefaultOutput", qmpSettingsWindow::getDefaultOutWidget()->currentText()); diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 1c4d7d3..6e10389 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -577,8 +577,9 @@ void qmpMainWindow::startRender() #ifdef _WIN32 char* ofstr=wcsto8bit((plistw->getSelectedItem()+QString(".wav")).toStdWString().c_str()); char* ifstr=wcsto8bit(plistw->getSelectedItem().toStdWString().c_str()); - player->rendererLoadFile(ofstr); - playerSetup();player->rendererInit(ifstr); + fluidrenderer=new qmpFileRendererFluid(ifstr,ofstr); + playerSetup(fluidrenderer); + fluidrenderer->rendererInit(); free(ofstr);free(ifstr); #else fluidrenderer=new qmpFileRendererFluid( diff --git a/qmidiplayer-lite/qmidiplayer-lite.pro b/qmidiplayer-lite/qmidiplayer-lite.pro index 9b02387..47b47bd 100644 --- a/qmidiplayer-lite/qmidiplayer-lite.pro +++ b/qmidiplayer-lite/qmidiplayer-lite.pro @@ -36,7 +36,7 @@ exists("/usr/include/rtmidi/RtMidi.h") { win32{ DEFINES += RT_MIDI_H=\\\"RtMidi.h\\\" #change these before building... - LIBS += e:/libs/fluidsynth/fluidsynth.lib winmm.lib + LIBS += e:/libs/fluidsynth/libfluidsynth.dll.a winmm.lib Release:LIBS += e:/libs/rtmidi/rtmidi.lib Debug:LIBS += e:/libs/rtmidi/rtmidid.lib INCLUDEPATH += e:/libs/fluidsynth/include diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 43414b6..30e4075 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -182,7 +182,7 @@ void qmpVisualization::showThread() pos[0]=0;pos[1]=120;pos[2]=70; rot[0]=0;rot[1]=75;rot[2]=90; } - ctk=0; + ctk=api->getCurrentTimeStamp(); if(savevp) { pos[0]=api->getOptionDouble("Visualization/px"); -- cgit v1.2.3