Codechange: Pass a MusicSongInfo struct instead of bare filename to music drivers.
Preparation for later extending the info passed to music drivers.
This commit is contained in:
committed by
Michael Lutz
parent
1c2d29e1a3
commit
f946b3da56
@@ -21,6 +21,7 @@
|
||||
#include "../core/mem_func.hpp"
|
||||
#include "../thread/thread.h"
|
||||
#include "../fileio_func.h"
|
||||
#include "../base_media_base.h"
|
||||
#include "dmusic.h"
|
||||
#include "midifile.hpp"
|
||||
#include "midi.h"
|
||||
@@ -1225,11 +1226,13 @@ void MusicDriver_DMusic::Stop()
|
||||
}
|
||||
|
||||
|
||||
void MusicDriver_DMusic::PlaySong(const char *filename)
|
||||
void MusicDriver_DMusic::PlaySong(const MusicSongInfo &song)
|
||||
{
|
||||
if (song.filetype != MTT_STANDARDMIDI) return;
|
||||
|
||||
ThreadMutexLocker lock(_thread_mutex);
|
||||
|
||||
_playback.next_file.LoadFile(filename);
|
||||
_playback.next_file.LoadFile(song.filename);
|
||||
_playback.next_segment.start = 0;
|
||||
_playback.next_segment.end = 0;
|
||||
_playback.next_segment.loop = false;
|
||||
|
||||
Reference in New Issue
Block a user