- Fixed: FMOD as MIDI device always looped the song, even when it shouldn't (such as the title music).

SVN r3425 (trunk)
This commit is contained in:
Randy Heit 2012-03-11 03:56:20 +00:00
parent 51e66acc6b
commit 957f67f7cc
2 changed files with 3 additions and 2 deletions

View file

@ -145,7 +145,7 @@ bool TimidityPPMIDIDevice::Preprocess(MIDIStreamer *song, bool looping)
CommandLine.UnlockBuffer();
// Write MIDI song to temporary file
song->CreateSMF(midi);
song->CreateSMF(midi, looping ? 0 : 1);
f = fopen(DiskName, "wb");
if (f == NULL)

View file

@ -255,7 +255,8 @@ bool FMODMIDIDevice::Preprocess(MIDIStreamer *song, bool looping)
{
TArray<BYTE> midi;
song->CreateSMF(midi);
song->CreateSMF(midi, looping ? 0 : 1);
bLooping = looping;
Stream = GSnd->OpenStream((char *)&midi[0], looping ? SoundStream::Loop : 0, -1, midi.Size());
return false;
}