diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-01-01 23:54:06 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-01-01 23:54:06 +0800 |
commit | d418712c981d9854fa6429d65773368ca63b8dac (patch) | |
tree | 48eb1f25753a1734a3d7cf5d8303e7936c4844f3 /qmpmidiplay.cpp | |
parent | 3db127ce64eadb54568e218124744a1de713667e (diff) | |
download | QMidiPlayer-d418712c981d9854fa6429d65773368ca63b8dac.tar.xz |
Strawberry Crisis. (WTF)
Diffstat (limited to 'qmpmidiplay.cpp')
-rw-r--r-- | qmpmidiplay.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmpmidiplay.cpp b/qmpmidiplay.cpp index 0eae6aa..adfdeb6 100644 --- a/qmpmidiplay.cpp +++ b/qmpmidiplay.cpp @@ -8,7 +8,6 @@ void CMidiPlayer::fluidInitialize(const char* sf) settings=new_fluid_settings(); fluid_settings_setstr(settings,"audio.driver","pulseaudio"); fluid_settings_setint(settings,"synth.cpu-cores",4); - fluid_settings_setint(settings,"synth.min-note-length",0); fluid_settings_setint(settings,"synth.polyphony",2048); synth=new_fluid_synth(settings); adriver=new_fluid_audio_driver(settings,synth); @@ -149,7 +148,7 @@ void CMidiPlayer::fileTimer2Pass() for(int i=0;i<16;++i)for(int j=0;j<132;++j) ccstamps[c][i][j]=ccc[i][j]; stamps[c++]=eptr; - if(c>100)throw; + if(c>100)break; } ct=midiFile->getEvent(eptr)->time; } @@ -211,6 +210,7 @@ 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();} const char* CMidiPlayer::getTitle(){return midiFile->getTitle();} const char* CMidiPlayer::getCopyright(){return midiFile->getCopyright();} double CMidiPlayer::getTempo(){return 60./(ctempo/1e6)*ctsd/4.;} |