40 Commits

Author SHA1 Message Date
Orgad Shaneh
f0554f148a LURE: Remove unused private member
Detected by Clang.
2021-03-15 13:20:52 +02:00
NMIError
17f4e65aff LURE: Improve MT-32 fade-out in intro
The first track in the LotT introduction fades out before the second track
starts. The fade-out is implemented by reducing the velocity of the new notes
that are being played. Because this does not affect notes that are already
playing, the fade-out effect is not very good. I've replaced this by a fade-out
using MIDI channel volume.
2020-12-08 17:00:28 +01:00
NMIError
432529b2bb LURE: Fix chute animation
The animation that plays when you fall through the sewage chute near the start
of the game had some issues. Fades were missing at several points, the middle
part of the animation was played only once and too slow, and when skipping the
animation it would only skip the currently playing part instead of the entire
animation.

To fix these issues, I've added an option to AnimationSequence to loop the
animation a number of times.
2020-12-08 17:00:28 +01:00
NMIError
20d5307bb9 LURE: Stop MIDI notes when pausing
When pausing the game by bringing up the ScummVM menu, the MIDI notes would
hang. I've added code to pause and resume the active MIDI parsers, which stops
the active notes.
2020-12-06 16:37:08 +00:00
NMIError
89e6ffc2e6 LURE: Use MT-32/GM MidiDriver
This change adds the MT-32/GM multisource MidiDriver to LotT. This adds the
following functionality:
- MT-32 initialization using the SysEx queue. ScummVM will remain responsive
while the SysExes are sent and the user can abort the process when skipping the
introduction or quitting the game.
- Use of Roland GS MT-32 instrument mapping.

It also allows for a proper implementation of music fade-outs. Some
functionality previously implemented in SoundManager is now done by the driver.
2020-12-06 16:37:08 +00:00
NMIError
ffcf4976b7 LURE: Fix looping sound effects
Some sound effects in LotT loop, like the thunderstorm in the beginning of the
game. This is indicated by the high bit of the sound number. This change adds
support for these looping sound effects.
2020-12-06 16:37:08 +00:00
NMIError
c57ad9c1f5 LURE: Fix MT-32 sound volume
Lure of the Temptress defines a volume level for each sound resource. This is a
byte value which can increase or decrease the volume of the sound as specified
in the MIDI data (80h is the neutral value). The original interpreter applies
this as a scaling factor to the Note On velocity for the MT-32. ScummVM used it
to scale the MIDI volume control change values instead, causing incorrect
volume levels.

This change applies the sound resource volume to note velocity instead, which
results in the same volume as the original interpreter. I've left the old
method in place for AdLib, because I'm not sure how the original interpeter
handles sound resource volume in this case.
2020-12-06 16:37:08 +00:00
NMIError
991061ee1b LURE: Fix music/SFX distinction
Distinction between music and SFX was made based on the most significant bit in
the sound number byte. This does not accurately reflect which MIDI sequences
are music or a sound effect.

Instead, I've added a flag which can be passed to
SoundManager::musicInterface_Play to indicate whether the sound is music or a
sound effect. All music is started from hard-coded animation sequences, so this
flag can be passed from ScummVM code when appropriate.
2020-12-06 16:37:08 +00:00
NMIError
3d550b8535 LURE: Added MT-32 SysEx loading 2020-12-06 16:37:08 +00:00
Cameron Cawley
cf068bcc08 ALL: Remove direct use of OSystem::createMutex() 2020-08-21 09:39:00 +02:00
Bastien Bouclet
cca3309fba LURE: Add override keywords 2020-02-09 12:43:15 +01:00
Johannes Schickel
b03ca0e80a LURE: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Eugene Sandulenko
0dafa7f80f ALL: Reduce audio/ header dependency 2011-08-06 11:30:42 +01:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
088bd7a70b ENGINES: Remove unused MIDI pass-through code 2011-03-23 17:07:48 +01:00
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Johannes Schickel
e3d1ec482c LURE: Make LURE respect the mute settings.
svn-id: r51101
2010-07-21 20:12:35 +00:00
Arnaud Boutonné
1f79fd5788 Some more header modifications ("Graphic Adventure Engine" and the legal property paragraph)
svn-id: r47489
2010-01-23 22:50:24 +00:00
Max Horn
bce959e046 LURE: Remove evil 'using namespace' from header files
svn-id: r47396
2010-01-19 23:48:55 +00:00
Max Horn
51933629d1 Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
2009-11-02 21:54:57 +00:00
Christopher Page
7ecd54a9da Reverted some incorrect changes and fixed sound settings issues for LURE. Fixed issues with quitting and calling GMM during intro sequences in LURE. Added a KEYCODE_MAINMENU in common/keyboard.h for the GMM.
svn-id: r33081
2008-07-15 22:54:39 +00:00
Christopher Page
563e28b668 Fixed some warnings
svn-id: r32857
2008-06-30 23:06:38 +00:00
Christopher Page
c1ae3f7dd0 Sound settings for Lure can be modified through the GMM
svn-id: r32855
2008-06-30 22:41:55 +00:00
Filippos Karapetis
bd1224e36c Replaced ManagedList with Common::SharedPtr in lure's sound system
svn-id: r31419
2008-04-06 11:12:42 +00:00
Paul Gilbert
74e5ef5c56 Commit of Hans de Goede's patches to the sound handling code
svn-id: r31194
2008-03-19 10:37:33 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Paul Gilbert
dde154c3ed Removed old copyright 2005-2006 line from several files so that their headers are consistant with the other files
svn-id: r30433
2008-01-12 01:30:11 +00:00
Paul Gilbert
6eb64102a4 Fix to remove a tab character from the GPL header
svn-id: r30238
2008-01-05 12:45:14 +00:00
Torbjörn Andersson
943ab421a4 The _nativeMT32 in MidiMusic was never initialised. Rather than storing it in
two different classes, use the value in SoundManager instead. As a consequence
the engine now remaps the instruments from MT-32 to General MIDI for me, since
isRoland() is true and hasNativeMT32() is false. Earlier, it didn't since the
uninitialised _nativeMT32 happened to be true for me.

svn-id: r29878
2007-12-16 14:46:48 +00:00
Paul Gilbert
706e779236 Hooked up the sound code to use the configuration for sfx and music, and added code from the original game that used the high bit of sounds to distinguish between the two
svn-id: r29873
2007-12-16 08:19:56 +00:00
Paul Gilbert
5f1ef91820 Added storing of playing sounds to savegame (note: only sounds flagged as restorable are restarted after loading a savegame)
svn-id: r29271
2007-10-28 03:32:13 +00:00
Paul Gilbert
c5edcaa2ef Wrapped access to the playing sounds list in a mutex
svn-id: r29114
2007-09-28 07:55:02 +00:00
Paul Gilbert
b2e97060ad Initial sound implementation
svn-id: r28917
2007-09-16 04:06:49 +00:00
Paul Gilbert
c247257721 Added part of the framework for playing sounds
svn-id: r28545
2007-08-12 11:08:44 +00:00
Paul Gilbert
5e92ea378f Initial commit
svn-id: r27604
2007-06-22 12:30:18 +00:00