diff options
Diffstat (limited to 'src/aomusicplayer.cpp')
| -rw-r--r-- | src/aomusicplayer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/aomusicplayer.cpp b/src/aomusicplayer.cpp index 2b75baa5..16db1630 100644 --- a/src/aomusicplayer.cpp +++ b/src/aomusicplayer.cpp @@ -31,6 +31,8 @@ QString AOMusicPlayer::play(QString p_song, int channel, bool loop, if (f_path.startsWith("http")) { if (f_path.endsWith(".opus")) newstream = BASS_OPUS_StreamCreateURL(f_path.toStdString().c_str(), 0, streaming_flags, nullptr, 0); + else if (f_path.endsWith(".mid")) + newstream = BASS_MIDI_StreamCreateURL(f_path.toStdString().c_str(), 0, streaming_flags, nullptr, 0, 1); else newstream = BASS_StreamCreateURL(f_path.toStdString().c_str(), 0, streaming_flags, nullptr, 0); @@ -38,6 +40,10 @@ QString AOMusicPlayer::play(QString p_song, int channel, bool loop, f_path = ao_app->get_real_path(ao_app->get_music_path(p_song)); if (f_path.endsWith(".opus")) newstream = BASS_OPUS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, flags); + else if (f_path.endsWith(".mid")) + newstream = BASS_MIDI_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, flags, 1); + else if (f_path.endsWith(".mo3") || f_path.endsWith(".xm") || f_path.endsWith(".mod") || f_path.endsWith(".s3m") || f_path.endsWith(".it") || f_path.endsWith(".mtm") || f_path.endsWith(".umx") ) + newstream = BASS_MusicLoad(FALSE,f_path.utf16(), 0, 0, flags, 1); else newstream = BASS_StreamCreateFile(FALSE, f_path.utf16(), 0, 0, flags); } |
