Feature: Decoder for DOS version music

This is based on reverse-engineering the TTD DOS driver for General MIDI music.
This commit is contained in:
Niels Martin Hansen
2018-03-14 15:55:40 +01:00
committed by Michael Lutz
parent f946b3da56
commit 2ae9df7248
5 changed files with 492 additions and 25 deletions

View File

@@ -307,12 +307,14 @@ void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DW
void MusicDriver_Win32::PlaySong(const MusicSongInfo &song)
{
if (song.filetype != MTT_STANDARDMIDI) return;
DEBUG(driver, 2, "Win32-MIDI: PlaySong: entry");
EnterCriticalSection(&_midi.lock);
_midi.next_file.LoadFile(song.filename);
if (!_midi.next_file.LoadSong(song)) {
LeaveCriticalSection(&_midi.lock);
return;
}
_midi.next_segment.start = 0;
_midi.next_segment.end = 0;
_midi.next_segment.loop = false;