summaryrefslogtreecommitdiff
path: root/src/music/bemidi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/music/bemidi.cpp')
-rw-r--r--src/music/bemidi.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/music/bemidi.cpp b/src/music/bemidi.cpp
index 2bc207476..7d5793f0d 100644
--- a/src/music/bemidi.cpp
+++ b/src/music/bemidi.cpp
@@ -12,6 +12,7 @@
#include "../stdafx.h"
#include "../openttd.h"
#include "bemidi.h"
+#include "../base_media_base.h"
/* BeOS System Includes */
#include <MidiSynthFile.h>
@@ -34,11 +35,13 @@ void MusicDriver_BeMidi::Stop()
midiSynthFile.UnloadFile();
}
-void MusicDriver_BeMidi::PlaySong(const char *filename)
+void MusicDriver_BeMidi::PlaySong(const MusicSongInfo &song)
{
+ if (song.filetype != MTT_STANDARDMIDI) return;
+
this->Stop();
entry_ref midiRef;
- get_ref_for_path(filename, &midiRef);
+ get_ref_for_path(song.filename, &midiRef);
midiSynthFile.LoadFile(&midiRef);
midiSynthFile.Start();
}