aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/qmpmidiplay.cpp3
-rw-r--r--core/qmpmidiplay.hpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/qmpmidiplay.cpp b/core/qmpmidiplay.cpp
index ca2878c..5021640 100644
--- a/core/qmpmidiplay.cpp
+++ b/core/qmpmidiplay.cpp
@@ -196,7 +196,7 @@ void CMidiPlayer::prePlayInit()
}
void CMidiPlayer::playEvents()
{
- for(uint32_t ct=midiFile->getEvent(0)->time;tceptr<midiFile->getEventCount();)
+ for(ct=midiFile->getEvent(0)->time;tceptr<midiFile->getEventCount();)
{
while(tcpaused)std::this_thread::sleep_for(std::chrono::milliseconds(100));
using namespace std::chrono;
@@ -402,6 +402,7 @@ uint32_t CMidiPlayer::getFileStandard(){return midiFile?midiFile->getStandard():
const char* CMidiPlayer::getTitle(){return midiFile?midiFile->getTitle():"";}
const char* CMidiPlayer::getCopyright(){return midiFile?midiFile->getCopyright():"";}
double CMidiPlayer::getTempo(){return 60./(ctempo/1e6);}
+uint32_t CMidiPlayer::getTick(){return ct;}
uint32_t CMidiPlayer::getRawTempo(){return ctempo;}
uint32_t CMidiPlayer::getDivision(){return divs;}
uint32_t CMidiPlayer::getTCpaused(){return tcpaused;}
diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp
index a89a925..96dfd12 100644
--- a/core/qmpmidiplay.hpp
+++ b/core/qmpmidiplay.hpp
@@ -73,7 +73,7 @@ class CMidiPlayer
uint32_t ctempo,ctsn,ctsd,dpt,divs,cks;
//raw tempo, timesig num., timesig den., delay per tick, division, keysig
//thread control
- uint32_t tceptr,tcpaused,tcstop;
+ uint32_t tceptr,tcpaused,tcstop,ct;
uint32_t finished,resumed;
qmpMidiMapperRtMidi *mapper;
int mappedoutput[16],deviceusage[16],deviceiid[128];
@@ -123,6 +123,7 @@ class CMidiPlayer
uint32_t getFileNoteCount();
uint32_t getFileStandard();
double getTempo();
+ uint32_t getTick();
uint32_t getRawTempo();
uint32_t getDivision();
const char* getTitle();