aboutsummaryrefslogtreecommitdiff
path: root/qmpmidiplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmpmidiplay.cpp')
-rw-r--r--qmpmidiplay.cpp4
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()
{