diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-01-14 21:47:06 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-01-14 21:47:06 +0800 |
commit | 1e1036e705b20ea407bbb922e40c0f44147b3691 (patch) | |
tree | fe0d5560c3c44be62de50b8e433b81da0a135f70 /qmpmidiplay.cpp | |
parent | fab7ae34311b9bbb001c98baafa4b1a99aa3c18f (diff) | |
download | QMidiPlayer-1e1036e705b20ea407bbb922e40c0f44147b3691.tar.xz |
Innocent Treasure. (WTF)
Diffstat (limited to 'qmpmidiplay.cpp')
-rw-r--r-- | qmpmidiplay.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qmpmidiplay.cpp b/qmpmidiplay.cpp index 70fe91b..be5a60d 100644 --- a/qmpmidiplay.cpp +++ b/qmpmidiplay.cpp @@ -183,12 +183,14 @@ void CMidiPlayer::playerPanic() for(int i=0;i<16;++i)fluid_synth_all_notes_off(synth,i); //for(int i=0;i<16;++i)for(int j=0;j<128;++j)fluid_synth_noteoff(synth,i,j); } -void CMidiPlayer::playerLoadFile(const char* fn) +bool CMidiPlayer::playerLoadFile(const char* fn) { midiFile=new CMidiFile(fn); + if(!midiFile->isValid())return false; divs=midiFile->getDivision(); fileTimer1Pass(); fileTimer2Pass(); + return true; } void CMidiPlayer::playerInit() { |