aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.cpp
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 /core/qmpmidiplay.cpp
parentfd3fc10798fb4c8d63f6f3e538018774741f2b15 (diff)
downloadQMidiPlayer-a97307ba6e625468a1d8ad1049e6d9db0ad42d4d.tar.xz
Fixed FTBFS on Windows.
Fixed the default output device option. Seeking now restores CC values correctly.
Diffstat (limited to 'core/qmpmidiplay.cpp')
-rw-r--r--core/qmpmidiplay.cpp11
1 files changed, 10 insertions, 1 deletions
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);