aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-21 21:32:35 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-21 21:32:35 +0800
commita97307ba6e625468a1d8ad1049e6d9db0ad42d4d (patch)
treeab5f9b74b3316f63ae3a7d1bbb2f0dcb6dd445d9
parentfd3fc10798fb4c8d63f6f3e538018774741f2b15 (diff)
downloadQMidiPlayer-a97307ba6e625468a1d8ad1049e6d9db0ad42d4d.tar.xz
Fixed FTBFS on Windows.
Fixed the default output device option. Seeking now restores CC values correctly.
-rw-r--r--ChangeLog5
-rw-r--r--core/qmpmidiplay.cpp11
-rw-r--r--qmidiplayer-desktop/qmidiplayer-desktop.pro2
-rw-r--r--qmidiplayer-desktop/qmpchannelswindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp5
-rw-r--r--qmidiplayer-lite/qmidiplayer-lite.pro2
-rw-r--r--visualization/qmpvisualization.cpp2
7 files changed, 22 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c1f7dca..d749d78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
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 <fluidsynth.h>
#include "qmpmidiplay.hpp"
#ifdef _WIN32
+#define NOMINMAX
#include <windows.h>
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");