diff options
Diffstat (limited to 'src/music/libtimidity.cpp')
-rw-r--r-- | src/music/libtimidity.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/music/libtimidity.cpp b/src/music/libtimidity.cpp index f198280dc..42c1e3c15 100644 --- a/src/music/libtimidity.cpp +++ b/src/music/libtimidity.cpp @@ -14,6 +14,7 @@ #include "../sound_type.h" #include "../debug.h" #include "libtimidity.h" +#include "midifile.hpp" #include "../base_media_base.h" #include <fcntl.h> #include <sys/types.h> @@ -76,11 +77,12 @@ void MusicDriver_LibTimidity::Stop() void MusicDriver_LibTimidity::PlaySong(const MusicSongInfo &song) { - if (song.filetype != MTT_STANDARDMIDI) return; + std::string filename = MidiFile::GetSMFFile(song); this->StopSong(); + if (filename.empty()) return; - _midi.stream = mid_istream_open_file(song.filename); + _midi.stream = mid_istream_open_file(filename.c_str()); if (_midi.stream == NULL) { DEBUG(driver, 0, "Could not open music file"); return; |