From 65a8bde4e4beca860a13491e94631dc16b5e71af Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 29 Apr 2020 11:25:58 +0800 Subject: Decouple CMidiPlayer and qmpMidiOutFluid. Visualization renderer should no longer depend on the fluidsynth library. Reworked the "wait voice" option: now it only takes effect if an automatic track switch happens. Actually process events while waiting for async operation to finish. --- core/qmpmidiplay.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'core/qmpmidiplay.hpp') diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp index f896338..83a7128 100644 --- a/core/qmpmidiplay.hpp +++ b/core/qmpmidiplay.hpp @@ -9,9 +9,7 @@ #include #include #define QMP_MAIN -#include "../include/qmpcorepublic.hpp" -#include "qmpmidioutrtmidi.hpp" -#include "qmpmidioutfluid.hpp" +#include "qmpcorepublic.hpp" class CMidiPlayer; class CSMFReader:public qmpFileReader { @@ -66,12 +64,12 @@ class CMidiPlayer double ftime; bool sendSysEx,waitvoice; uint8_t chstatus[16][130];//0..127: cc 128: pc - qmpMidiOutFluid* internalFluid; uint32_t ctempo,ctsn,ctsd,divs,cks; double dpt;//time per tick //raw tempo, timesig num., timesig den., division, keysig //thread control - uint32_t tceptr,tcpaused,tcstop,ct; + uint32_t tceptr,tcpaused,ct; + bool tcstop; uint32_t finished,resumed; uint32_t pbr[16],pbv[16]; //playback correction @@ -123,9 +121,8 @@ class CMidiPlayer uint32_t getTCpaused(); void setTCpaused(uint32_t ps); uint32_t isFinished(); + bool stopFlag(); void setResumed(); - void setWaitVoice(bool wv); - void registerFluidOptions(qmpPluginAPI *coreapi); double getFtime(); void getCurrentTimeSignature(int *n,int *d); @@ -150,8 +147,6 @@ class CMidiPlayer uint16_t getCC(int ch,int id); void setCC(int ch,int id,int val); - qmpMidiOutFluid* fluid(); - void registerMidiOutDevice(qmpMidiOutDevice* dev,std::string name); void unregisterMidiOutDevice(std::string name); std::vector getMidiOutDevices(); -- cgit v1.2.3