[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.40,2.41 imuse.h,1.30,1.31 scummvm.cpp,2.160,2.161
Jamieson Christian
jamieson630 at users.sourceforge.net
Sat May 17 10:21:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv6433/scumm
Modified Files:
imuse.cpp imuse.h scummvm.cpp
Log Message:
Fixed Adlib sound problem on old (small header) games. Thanks for eriktorbjorn for the material that led to the solution.
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -d -r2.40 -r2.41
--- imuse.cpp 17 May 2003 03:06:15 -0000 2.40
+++ imuse.cpp 17 May 2003 17:20:26 -0000 2.41
@@ -286,6 +286,7 @@
friend struct Player;
private:
+ bool _old_adlib_instruments;
bool _enable_multi_midi;
MidiDriver *_midi_adlib;
MidiDriver *_midi_native;
@@ -1654,6 +1655,9 @@
case IMuse::PROP_MULTI_MIDI:
_enable_multi_midi = (value > 0);
break;
+
+ case IMuse::PROP_OLD_ADLIB_INSTRUMENTS:
+ _old_adlib_instruments = (value > 0);
}
return 0;
}
@@ -1697,6 +1701,8 @@
void IMuseInternal::initMidiDriver (MidiDriver *midi) {
// Open MIDI driver
+ midi->property (MidiDriver::PROP_OLD_ADLIB, _old_adlib_instruments ? 1 : 0);
+
int result = midi->open();
if (result)
error("IMuse initialization - ", MidiDriver::getErrorName(result));
@@ -3477,7 +3483,5 @@
// to the client.
IMuse *IMuse::create (OSystem *syst, MidiDriver *midi) {
IMuseInternal *engine = IMuseInternal::create (syst, midi);
- if (midi)
- midi->property (MidiDriver::PROP_SMALLHEADER, (g_scumm->_features & GF_SMALL_HEADER) ? 1 : 0);
return new IMuse (syst, engine);
}
Index: imuse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- imuse.h 17 May 2003 03:06:16 -0000 1.30
+++ imuse.h 17 May 2003 17:20:26 -0000 1.31
@@ -46,7 +46,8 @@
enum {
PROP_TEMPO_BASE = 1,
PROP_NATIVE_MT32 = 2,
- PROP_MULTI_MIDI = 3
+ PROP_MULTI_MIDI = 3,
+ PROP_OLD_ADLIB_INSTRUMENTS = 4
};
void on_timer (MidiDriver *midi);
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.160
retrieving revision 2.161
diff -u -d -r2.160 -r2.161
--- scummvm.cpp 17 May 2003 10:04:30 -0000 2.160
+++ scummvm.cpp 17 May 2003 17:20:26 -0000 2.161
@@ -606,6 +606,7 @@
if (_imuse) {
if (detector->_gameTempo != 0)
_imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo);
+ _imuse->property (IMuse::PROP_OLD_ADLIB_INSTRUMENTS, (_features & GF_SMALL_HEADER) ? 1 : 0);
_imuse->property (IMuse::PROP_MULTI_MIDI, detector->_multi_midi);
_imuse->property (IMuse::PROP_NATIVE_MT32, detector->_native_mt32);
_imuse->set_music_volume(_sound->_sound_volume_music);
More information about the Scummvm-git-logs
mailing list