Commit Graph

537 Commits

Author SHA1 Message Date
D G Turner
1d93c80c14 DRACI: Fix VS2010 Code Analysis Warnings Reported in Bug #3290634
Minor correction to use integer value, rather than boolean.
2011-04-22 03:55:22 +01:00
Johannes Schickel
7b4a4d9fa6 Merge pull request "New mixer mute handling."
See https://github.com/scummvm/scummvm/pull/12 for more information.
2011-04-18 15:59:34 +02:00
Johannes Schickel
6b0ccbb095 AUDIO: Renamed mute related functions in Mixer.
This renames setMuteForSoundType to muteSoundType and getMuteForSoundType to
isSoundTypeMuted.
2011-04-16 18:30:45 +02:00
Max Horn
84184aabc0 ALL: colour -> color 2011-04-14 14:12:35 +02:00
Johannes Schickel
f61eff4404 DRACI: Adapt to new muting style. 2011-04-13 23:48:51 +02:00
Max Horn
8c931fd1e8 AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use it 2011-03-28 18:06:36 +02:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
4780eb7393 DRACI: Change MusicPlayer to derive from Audio::MidiPlayer 2011-03-24 16:46:46 +01:00
Max Horn
2d4dff8cb4 DRACI: Fix incorrect 'all notes off' handling 2011-03-24 16:46:46 +01: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
dhewg
d12278b4cc DRACI: Respect global mute settings 2011-03-19 16:04:51 +01:00
dhewg
e43d54fa96 DRACI: Init volume levels on startup 2011-03-19 16:04:50 +01:00
Johannes Schickel
8db9fca56c DRACI: Adapt to setPalette RGBA->RGB. 2011-02-14 17:08:32 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Max Horn
6edc86a19b DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engine
svn-id: r54815
2010-12-07 18:54:21 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
a008d14055 ENGINES: Do not use MemoryReadStream where (Seekable)ReadStream suffices; avoid using 'using'
svn-id: r54323
2010-11-18 16:38:03 +00:00
David Turner
3d961469fd DRACI: Added basic debugging console to engine
Since DRACI uses Debug Channels, this allows for the interactive setting of debugflags as well as providing a base for adding further debugging commands.

svn-id: r54116
2010-11-07 15:03:54 +00:00
Max Horn
18d40017e8 ENGINES: Unify code layout of all ADParams instances
svn-id: r54105
2010-11-07 01:01:18 +00:00
Johannes Schickel
1ed0051fce DRACI: Switch to the new play time counting of the Engine class.
svn-id: r53925
2010-10-29 16:54:10 +00:00
Max Horn
3534cff8ef ALL: Fix indention (whitespaces -> tabs)
svn-id: r53738
2010-10-23 15:46:50 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Johannes Schickel
b2c57117fd DRACI: Initialize MIDI channel volume properly.
This fixes bug #3067148 "DRACI: Volume range not respected". It seems Draci's
MIDI files do not setup the channel volume properly before using the channels,
but rely on having the maxed out. Since formerly the channel volume was
initialized to 255, it caused the channel volume to be zero in case the user
used 128 for his volume settings (128*255/255=128, and MIDI volume goes from
0-127).

svn-id: r52738
2010-09-15 22:30:00 +00:00
Johannes Schickel
6588398ce6 MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI,
GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset
device on startup. The sound output still works fine (started up a game
from every engine), so this should hopefully not introduce any regressions.

As far as I can tell it seems that SCUMM does send a proper device reset, so
I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am
not sure about SCI though.

This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI".

svn-id: r52736
2010-09-15 22:00:20 +00:00
Eugene Sandulenko
2a3f985566 DRACI: Fix warnings
svn-id: r52144
2010-08-17 10:59:11 +00:00
Robert Špalek
3d228f270f DRACI: recognize German translation
svn-id: r51707
2010-08-03 17:09:27 +00:00
Max Horn
7364b9bb2f BUILD: Remove redundant MODULE_DIRS modification
svn-id: r51464
2010-07-29 13:01:39 +00:00
Torbjörn Andersson
f98fa72ef3 Changed abs() to ABS() in a few places.
svn-id: r50890
2010-07-14 17:02:14 +00:00
Robert Špalek
0fd3558986 Finish support of compressed dubbing
Now even the length of a compressed stream is measured precisely and
the dubbing sounds exactly like the original.

svn-id: r50618
2010-07-03 05:05:28 +00:00
Robert Špalek
8d26e7c2d2 Dragon History tries uses compressed dubbing when available
Timing of speaking is not fixed yet.

svn-id: r50614
2010-07-03 03:48:26 +00:00
Robert Špalek
6859a30555 Fix a typo in the RAW format bugfix :-)
svn-id: r50559
2010-07-01 17:16:06 +00:00
Robert Špalek
2d6f912bd1 Fix playing RAW and RAW80 streams
svn-id: r50558
2010-07-01 17:06:14 +00:00
Robert Špalek
b45d2cd92b Implement playing RAW/MP3/OGG/FLAC dubbing from ZIP archives.
Playing works well, but I am not enabling it in the game player yet, because
I have not implemented measuring the time duration of compressed dubbing,
which is needed in the (exclusively used) blocking mode.

svn-id: r50543
2010-07-01 07:10:40 +00:00
Robert Špalek
c7f6a5b286 Generalize the sound archive framework to be able to open new formats
svn-id: r50519
2010-06-30 08:27:09 +00:00
Robert Špalek
76b8c33aaf Fade palette in/out when entering/leaving a location
svn-id: r50409
2010-06-28 04:59:13 +00:00
Robert Špalek
d4a0c8a1ad bugfix for the item fast-switching commit
svn-id: r50408
2010-06-28 04:16:00 +00:00
Robert Špalek
c7554c267e Implement shortcuts for switching items in the inventory
slash: switch between the last held item and normal mouse
comma, period: replace the currently held item with the previous/next item in the inventory

Also, commented a bit better what happens when ESCAPE is present with respect to map
programs and cut-scenes.

svn-id: r50407
2010-06-28 04:04:16 +00:00
Robert Špalek
ae332b620e Run possible cut-scenes before each location change.
This is the behavior of the original player.  It is not necessary to click on
the hero.

svn-id: r50361
2010-06-27 04:19:55 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Eugene Sandulenko
44a39ffbc6 AdvancedDetector: Add new parameter directoryGlobs.
Without this parameter mass detection gave tons of false alarms.
Use globbing for narrowing down the depth search.

svn-id: r49788
2010-06-15 10:59:23 +00:00
Eugene Sandulenko
4d517ed0e9 Extended advancedDetector with depth parameter.
Now AD can search nested directories. By default it is turned off,
but there is new parameter to ADParameters struct. Usually value
of 2 is good enough for all purposes.

svn-id: r49653
2010-06-14 14:50:23 +00:00
Max Horn
2149a2383d Reduce indirect header dependencies further
svn-id: r48936
2010-05-04 12:00:16 +00:00
Max Horn
970745e60c Move DebugChannel related code to new header
svn-id: r48935
2010-05-04 11:59:22 +00:00
Max Horn
b3e404109c Move initGraphics and initCommonGFX from to new header.
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.

svn-id: r48934
2010-05-04 11:58:12 +00:00