Commit Graph

39 Commits

Author SHA1 Message Date
Max Horn
b4d547c736 cleanup
svn-id: r16476
2005-01-07 14:42:05 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Torbjörn Andersson
75645cbd40 Fixed an Adlib regression with older games (e.g. EGA Loom, Indy 3 and
Monkey VGA) that was introduced by a recent "multi MIDI" change.

The "old Adlib" property was set too late in the iMUSE player, so the Adlib
driver would always think the game was new. I've removed this property from
the iMUSE player, since it's only function appeared to be to pass it on to
the Adlib player, and now set it in the Adlib player directly instead.

Also removed some remaining "multi MIDI" traces from the iMUSE player that
I believe were obsoleted by the aforementioned "multi MIDI" change.

svn-id: r15974
2004-12-03 13:17:57 +00:00
Max Horn
1ae87c0fbb Trying to cleanup the volume control mess inside the SCUMM engine: renamed MusicEngine::setMasterVolume to setMusicVolume; fixed iMuse to use the correct method for setMusicVolume (previously modified the iMuse internal volume control); hooked up the volume control of various other music engines; added ScummEngine::setupVolume method which can be called whenever volume settings change, and which gurantees that those are handled uniformly
svn-id: r15944
2004-11-28 21:24:02 +00:00
Jerome Fisher
8d0ab890f8 To really, truly fix the multi-midi race condition, the adlib driver is now always created before iMuse initialisation. This necessitated removing the multimidi toggle from the debug console.
svn-id: r15912
2004-11-27 14:53:37 +00:00
Max Horn
033ff78ae9 updated copyright notice
svn-id: r12176
2004-01-06 12:45:34 +00:00
Paweł Kołodziejski
1f9e408e2f cleanup whitespaces
svn-id: r11217
2003-11-08 21:59:32 +00:00
Jamieson Christian
0279ace9ae Added trace output for IMuse doCommand codes that we're not sure
are even used by the game scripts. This is in preparation for a
restructuring of the volume model.

Also removed unused get_music_volume() member.

svn-id: r10872
2003-10-17 16:46:06 +00:00
Max Horn
d71160af74 removed the kDefault*Volume constants
svn-id: r10816
2003-10-15 23:16:52 +00:00
Jamieson Christian
a722d0601e Preliminary preparation for new YM2612 FM emulator.
All the hooks are in, but actual implementation
needs to be checked for portability.

svn-id: r10615
2003-10-05 15:36:52 +00:00
Max Horn
d7660a2662 introduced namespace Scumm; made #include statements use scumm/ prefix explicitly
svn-id: r10571
2003-10-03 18:33:57 +00:00
Max Horn
2ed4677ede const as const can
svn-id: r10555
2003-10-03 00:59:27 +00:00
Max Horn
3f55f2669d renamed class Scumm to ScummEngine (consisten with other engine names; also makes room for a potential 'Scumm' namespace)
svn-id: r10549
2003-10-02 22:42:03 +00:00
Jamieson Christian
b75a925640 Fix for Bug [812737] ALL: pitchbend range with MT32
Manual scaling of pitchbends to account for the fact that the
MT32 doesn't respond to RPN-based pitchbend range adjustments.
Also tweaked the MT32 partial reserve settings per Bug [812740].

svn-id: r10521
2003-10-01 15:19:12 +00:00
Jamieson Christian
e70fcf1737 Fix for Bug [812740] ALL: MT32: some notes cut off early
logicdeluxe's patch to set MT-32 partial reserves
equally for all channels, to ensure that entire
notes don't get cut off. The patch as committed is
slightly modified to reorder the MT-32 initialization
sequence. The mods (1) ensure a brief delay between
SysEx transmissions to give the MT-32 time to process
each request, and (2) hopefully sequence the delays
such that the ScummVM welcome message is actually
readable and doesn't just flash for a split-second
(as was the reported behavior in the past).

svn-id: r10498
2003-09-30 08:25:57 +00:00
Jamieson Christian
70e8d2780d Cleanup, mostly related to matching up semantics
between Part and MidiChannel (which Part may
derive from eventually).

svn-id: r10480
2003-09-29 08:09:38 +00:00
Jamieson Christian
3f845084f1 Fixed iMuse termination sequence to avoid deadlock.
Fixes Bug [813920].

svn-id: r10477
2003-09-29 06:32:46 +00:00
Jamieson Christian
044bcd5430 Added terminate() to the MusicEngine and publicized
the iMuse implementation. This allows the termination
sequence to be done BEFORE object destruction, so
that the destructor is not making calls that may not
be appropriate during object destruction. (Virtual
functions were the concern, although I'm not sure any
of that was happening anyway. Oh well, better to be
safe than sorry.)

I implemented an empty terminate() in the base class,
but the other MusicEngine derivatives may have stuff
in their destructors that should be moved to this
method. I didn't check.

svn-id: r10452
2003-09-28 00:03:24 +00:00
Max Horn
392651dc1b removed unused macro
svn-id: r10357
2003-09-21 18:15:28 +00:00
Max Horn
1dbab0237f cleanup/refactoring
svn-id: r10070
2003-09-07 19:28:45 +00:00
Max Horn
361c3b95d5 some cleanup; clarified isSoundInUse semantics and the difference between IMuse::get_sound_active and IMuse::getSoundStatus; added lots of const qualifiers to IMuse; rewrote IMuseInternal::getSoundStatus (hopefully not breaking it); added MusicEngine::getSoundStatus
svn-id: r10069
2003-09-07 17:14:56 +00:00
Max Horn
0012f7fa96 added common base class MusicEngine for iMuse/iMuseDigital/Player_V123 (initial stab, more work to follow)
svn-id: r10066
2003-09-07 16:16:19 +00:00
Jamieson Christian
d7fae3d1cb More corrections to the VAR_MUSIC_TIMER
computations, mostly to produce the
exptected output with AD resources.

svn-id: r9730
2003-08-16 17:08:22 +00:00
Jamieson Christian
121b00a6f7 Corrected timing mechanism for RO music streams.
RO streams have built-in timer markers (the
unknown 0xA0 mentioned in FR [742249]) that
override automated methods of updating
VAR_MUSIC_TIMER. Since these timer markers
do not seem to be present in AD resources, the
old mechanism is used if MD_ADLIB is the current
MidiDriver.

svn-id: r9720
2003-08-16 09:34:19 +00:00
Bertrand Augereau
830d1b702a Made Player::decode_sysex_bytes const-correct.
svn-id: r9672
2003-08-13 22:43:08 +00:00
Jamieson Christian
442c79671a Removed unused stuff.
svn-id: r9647
2003-08-12 07:32:43 +00:00
Jamieson Christian
1615278ecc Upgraded IMuse::doCommand() to support more than 8 parameters.
V6 scripts can specify up to 16 parameters to be passed to
doCommand(). In most cases 8 or fewer parameters were used,
but occasional uses of 9 or 10 parameters resulted in
incorrect iMuse behavior due to lost doCommand() data.

ImTrigger was also upgraded to support 8 parameters instead
of 4, since the incorrect behavior that was observed involved
the use of triggered commands that required more than 4
parameters. Since ImTrigger data is not currently being saved
(which is bad), we do not at this time have to go to another
savegame format to support the additional ImTrigger data
(which is good).

This fix corrects a problem in the Tunnel of Love. When the
"execution scene" music finishes and the hidden door opens,
the Tunnel of Love music is supposed to start up again. In
ScummVM, it never would, do to the loss of parameters for a
trigger-based "Parameter Fade" command.

A bit of miscellaneous cleanup has also been made.

svn-id: r9579
2003-08-06 18:20:15 +00:00
Max Horn
75db41750e getting rid of g_mixer; removing lots of whitespace
svn-id: r9527
2003-08-05 23:58:24 +00:00
Max Horn
7c2713f57a indention fix (so the code adheres to our indention rules)
svn-id: r9384
2003-08-01 20:39:16 +00:00
Jamieson Christian
452735e320 Some last SysEx cleanup.
svn-id: r8223
2003-06-01 04:05:13 +00:00
Jamieson Christian
ebedd3b41c Fixed a MORONIC oob memory write. Now back to remedial C++ class
svn-id: r8019
2003-05-26 20:42:25 +00:00
Jamieson Christian
991b2997d4 More cleanup, plus more crash-aversion fixes.
Restored the -t command line option that had gotten lost in the revamp.

svn-id: r7962
2003-05-25 16:40:17 +00:00
Jamieson Christian
9d53046039 Fixed music starting at incorrect location when loading game
svn-id: r7961
2003-05-25 16:21:55 +00:00
Jamieson Christian
0768f103ea Put the comment back on IMUSE_DEBUG. Duh.
svn-id: r7903
2003-05-24 19:51:29 +00:00
Jamieson Christian
34162afd9e Removed more unnecessary code
svn-id: r7901
2003-05-24 19:43:20 +00:00
Jamieson Christian
30affb5fbc Various iMuse cleanup
svn-id: r7900
2003-05-24 19:20:52 +00:00
Jamieson Christian
eb09051517 Added XMIDI support to IMuse. IMuse now plays music from Humongous games.
Added some IMuse property options to support some assumptions that seem to be made by Humongous games.

This is still preliminary. It will play music, and it will switch between songs. But I don't know if it's switching to the right song at the right time.

svn-id: r7869
2003-05-23 18:35:53 +00:00
Jamieson Christian
c6568530bd Revamped iMuse and Player classes. Player now uses MidiParser to parse its data, which will allow it to parse other MIDI formats. To receive parsed data, Player now derives from MidiDriver to act as a "fake MIDI driver".
Miscellaneous upgrades and fixes to MidiParser, including the Smart Jump (which could not be tested before iMuse started making use of the MidiParser).

*** THIS IS A BIG UPGRADE! EXTENSIVE REGRESSION TESTING IS NEEDED! ***

This has been tested through the intros and a number of other scenes from MI2, FOA and S&M.

NOTE! This upgrade introduces savegame format version V19. Earlier version savegames will load, but the music will simply start over from the beginning. Only V19 and later games will properly restore the position of the music! Don't say you weren't warned....

svn-id: r7849
2003-05-23 04:19:47 +00:00
Jamieson Christian
3c0fdf9917 Separated IMuse Player into its own file
svn-id: r7832
2003-05-22 16:15:48 +00:00