summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-13 13:02:15 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-13 13:02:15 +0800
commitfab7ae34311b9bbb001c98baafa4b1a99aa3c18f (patch)
tree653585f73937d5500b9b8174b4ca4cbb6cbc547c
parent541f06f62286d61524be67356a5272f4428b88a6 (diff)
downloadQMidiPlayer-fab7ae34311b9bbb001c98baafa4b1a99aa3c18f.tar.xz
Border of Life. (WTF)
-rw-r--r--ChangeLog3
-rw-r--r--README.md2
-rw-r--r--qmphelpwindow.hpp2
-rw-r--r--qmpmidiplay.cpp16
-rw-r--r--qmpmidiplay.hpp3
5 files changed, 21 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 01977e5..7c008c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-01-13 0.6.2 beta
+Hopefully this fixed several critical bugs...
+
2016-01-10 0.6.2 beta
Minor behavior changes and bug fixes.
diff --git a/README.md b/README.md
index 1c82623..36b985b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# QMidiPlayer
A cross-platform midi file player based on libfluidsynth and Qt.
-Now it's in beta stage. Crashes may still occur, ~run with gdb attatched if you could~.
+Now it's in beta stage. Crashes and hangs may still occur, ~run with gdb attatched if you could~.
Features:
* Channel mute/solo
diff --git a/qmphelpwindow.hpp b/qmphelpwindow.hpp
index abcfe54..73221ca 100644
--- a/qmphelpwindow.hpp
+++ b/qmphelpwindow.hpp
@@ -2,7 +2,7 @@
#define QMPHELPWINDOW_H
#include <QDialog>
-#define APP_VERSION "0.6.1"
+#define APP_VERSION "0.6.2"
namespace Ui {
class qmpHelpWindow;
diff --git a/qmpmidiplay.cpp b/qmpmidiplay.cpp
index 6825a12..70fe91b 100644
--- a/qmpmidiplay.cpp
+++ b/qmpmidiplay.cpp
@@ -95,6 +95,12 @@ void CMidiPlayer::processEventStub(const SEvent *e)
ctempo=e->p2;dpt=ctempo*1000/divs;
ccc[0][131]=dpt;
break;
+ case 0x58:
+ ccc[0][132]=e->p2;
+ break;
+ case 0x59:
+ ccc[0][133]=e->p2;
+ break;
}
}
break;
@@ -139,8 +145,11 @@ void CMidiPlayer::fileTimer2Pass()
ccc[i][11]=127;ccc[i][71]=64;ccc[i][72]=64;
ccc[i][73]=64;ccc[i][74]=64;ccc[i][75]=64;
ccc[i][76]=64;ccc[i][77]=64;ccc[i][78]=64;
- ccc[0][131]=dpt;
+ ccc[0][131]=dpt;ccc[0][132]=0x04021808;
+ ccc[0][133]=0;
}
+ for(int i=0;i<16;++i)for(int j=0;j<134;++j)
+ ccstamps[0][i][j]=ccc[i][j];
for(uint32_t eptr=0,ct=midiFile->getEvent(0)->time;eptr<midiFile->getEventCount();)
{
while(eptr<midiFile->getEventCount()&&ct==midiFile->getEvent(eptr)->time)
@@ -149,7 +158,7 @@ void CMidiPlayer::fileTimer2Pass()
ctime+=(midiFile->getEvent(eptr)->time-ct)*dpt/1e9;
while(ctime>ftime*c/100.)
{
- for(int i=0;i<16;++i)for(int j=0;j<132;++j)
+ for(int i=0;i<16;++i)for(int j=0;j<134;++j)
ccstamps[c][i][j]=ccc[i][j];
stamps[c++]=eptr;
if(c>100)break;
@@ -233,6 +242,7 @@ uint32_t CMidiPlayer::getStamp(int id){return stamps[id];}
uint32_t CMidiPlayer::getTCeptr(){return tceptr;}
void CMidiPlayer::setTCeptr(uint32_t ep,uint32_t st)
{
+ resumed=true;
if(ep==midiFile->getEventCount())tcstop=1;else tceptr=ep;
for(int i=0;i<16;++i)
{
@@ -240,6 +250,8 @@ void CMidiPlayer::setTCeptr(uint32_t ep,uint32_t st)
fluid_synth_program_change(synth,i,ccstamps[st][i][128]);
//fluid_synth_pitch_bend(synth,i,ccstamps[st][i][130]);
dpt=ccstamps[st][0][131];ctempo=dpt*divs/1000;
+ ctsn=ccstamps[st][0][132]>>24;ctsd=1<<((ccstamps[st][0][132]>>16)&0xFF);
+ cks=ccstamps[st][0][133];
}
}
double CMidiPlayer::getFtime(){return ftime;}
diff --git a/qmpmidiplay.hpp b/qmpmidiplay.hpp
index 514a825..dc09393 100644
--- a/qmpmidiplay.hpp
+++ b/qmpmidiplay.hpp
@@ -53,7 +53,8 @@ class CMidiPlayer
private:
CMidiFile *midiFile;
uint32_t stamps[101];
- uint32_t ccstamps[101][16][132],ccc[16][132];//0..127:cc 128:pc 129:cp 130:pb 131:tempo
+ uint32_t ccstamps[101][16][134],ccc[16][134];
+ //0..127:cc 128:pc 129:cp 130:pb 131:tempo 132:ts 133:ks
uint16_t mute,solo;
double ftime;
bool sendSysEx;