aboutsummaryrefslogtreecommitdiff
path: root/qmpmidiplay.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-06 21:28:44 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-06 21:28:44 +0800
commit7fccb61519fe84b2ced274f1cc4859d5000e86c6 (patch)
treef66696e67d56e9e6015d613af84562364baaa9ed /qmpmidiplay.cpp
parent8099672c3fd0bfc7804b0a92d05c57dcd4307268 (diff)
downloadQMidiPlayer-7fccb61519fe84b2ced274f1cc4859d5000e86c6.tar.xz
Maple Dream. (WTF)
Diffstat (limited to 'qmpmidiplay.cpp')
-rw-r--r--qmpmidiplay.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qmpmidiplay.cpp b/qmpmidiplay.cpp
index 2578d6c..6825a12 100644
--- a/qmpmidiplay.cpp
+++ b/qmpmidiplay.cpp
@@ -245,11 +245,11 @@ void CMidiPlayer::setTCeptr(uint32_t ep,uint32_t st)
double CMidiPlayer::getFtime(){return ftime;}
void CMidiPlayer::getCurrentTimeSignature(int *n,int *d){*n=ctsn;*d=ctsd;}
void CMidiPlayer::getCurrentKeySignature(int *ks){*ks=cks;}
-uint32_t CMidiPlayer::getFileNoteCount(){return midiFile->getNoteCount();}
-uint32_t CMidiPlayer::getFileStandard(){return midiFile->getStandard();}
-const char* CMidiPlayer::getTitle(){return midiFile->getTitle();}
-const char* CMidiPlayer::getCopyright(){return midiFile->getCopyright();}
-double CMidiPlayer::getTempo(){return 60./(ctempo/1e6)*ctsd/4.;}
+uint32_t CMidiPlayer::getFileNoteCount(){return midiFile?midiFile->getNoteCount():0;}
+uint32_t CMidiPlayer::getFileStandard(){return midiFile?midiFile->getStandard():0;}
+const char* CMidiPlayer::getTitle(){return midiFile?midiFile->getTitle():"";}
+const char* CMidiPlayer::getCopyright(){return midiFile?midiFile->getCopyright():"";}
+double CMidiPlayer::getTempo(){return 60./(ctempo/1e6)/**ctsd/4.*/;}
uint32_t CMidiPlayer::getTCpaused(){return tcpaused;}
void CMidiPlayer::setTCpaused(uint32_t ps){tcpaused=ps;}
uint32_t CMidiPlayer::isFinished(){return finished;}