Commit Graph
47 Commits
Author SHA1 Message Date
Adrian Frühwirth 56d2bf77ba SCUMM: Ensure pointer returned by getResourceAddress() is usable
In some cases the pointer returned is used directly without further
error checking.
As most instances already assert() in this case this commit simply
adds asserts where missing and deemed appropriate.
2018-06-01 17:08:39 +00:00
Colin Snover 08186aeec6 SCUMM: Rename iMUSE save/load function to avoid confusing function hiding 2018-01-31 21:24:09 -06:00
Colin Snover 2e061d95c5 COMMON: Move VER macro for serializer into common code 2018-01-31 17:58:01 +01:00
Colin Snover 9916b26383 SCUMM: Replace UB-triggering serialization code with Common::Serializer
Fixes Trac#10342.
2018-01-31 17:58:01 +01:00
Johannes Schickel cbef6d0342 SCUMM: Slight renaming for clarification. 2016-03-16 15:39:48 +01:00
Johannes Schickel 70ca4218df SCUMM: Check whether sound effects are active in Player_AD::getSoundStatus.
This fixes bug #7076 "LOOM: AdLib sound effect not stopped at Cygna's grave.".

Original SCUMM (I checked Monkey Island EGA) implemented Sound::isSoundRunning
by checking whether the sound resource of the requested sound id is locked. We
use actual sound state inside the player.
2016-03-16 15:31:16 +01:00
Max Horn ac4360af88 SCUMM: Get rid of unused Audio::mixer references 2015-07-19 17:12:05 +02:00
Matthew Hoops bed9da8b9d AUDIO: Remove all AudioStream access to OPL 2015-07-07 20:19:47 -04:00
Matthew Hoops 0bb13b358e SCUMM: Use the built-in OPL timer for Player_AD 2015-07-07 20:19:42 -04:00
Matthew Hoops 2e8f9dcec9 AUDIO: Remove the sample rate configuration from the OPL code 2015-07-07 20:19:42 -04:00
Johannes Schickel 5797182aa2 SCUMM: Do not let music reallocate its own channels in AD player.
This makes it conform to the original.
2014-06-22 16:53:51 +02:00
Johannes Schickel e3aad13cd7 SCUMM: Change channel/slot (re)allocation strategy in AD player.
This makes sure that always the channel/slot with the lowest priority is
reallocated in case none is free. This fixes some music oddities in Indy3.
2014-06-22 16:51:27 +02:00
Johannes Schickel a21c9ef913 SCUMM: Don't allow SFX to reallocate their own channels in AD player. 2014-06-22 14:53:38 +02:00
Johannes Schickel 5be5f36aa9 SCUMM: Clear SFX channel when starting the SFX failed in AD player. 2014-06-22 14:53:38 +02:00
Johannes Schickel 0fb812fe3b SCUMM: Fix Indy3 AdLib door sfx. (See bug #6657)
Full name of the bug: "INDY3: Wrong sound when opening/closing doors (AdLib regression)".
2014-06-22 01:36:13 +02:00
Johannes Schickel 4069f63eb0 SCUMM: Save/load music/sfx data in AD player.
This makes sure that the currently playing music and sfx are resumed when
loading a save game.
2014-06-04 18:51:15 +02:00
Johannes Schickel eeed91c420 SCUMM: Implement simple seeking in AD player. 2014-06-04 18:51:15 +02:00
Johannes Schickel f63d00d4c6 SCUMM: Slightly refactor music playback in AD player. 2014-06-04 18:51:15 +02:00
Johannes Schickel 46b30f94c3 SCUMM: Only forward declare Serializer in music.h. 2014-06-04 18:51:15 +02:00
Johannes Schickel 051034f811 SCUMM: Simplify voice channel allocation in AD code. 2014-06-04 18:51:15 +02:00
Johannes Schickel 727cb7661c SCUMM: Fix typo in AD code. 2014-06-04 18:51:15 +02:00
Johannes Schickel 5ad589da06 SCUMM: Fix music looping in AD player. 2014-06-04 01:49:32 +02:00
Johannes Schickel efe5348d25 SCUMM: Only stop music instead of all sounds in music handling of AD player. 2014-06-04 01:49:31 +02:00
Johannes Schickel 46a95fa157 SCUMM: Make sound completely silent for volume level 0 in AD code. 2014-06-04 01:49:31 +02:00
Johannes Schickel d18c31e2eb SCUMM: Fix volume levels when playing SFX and music at the same time in AD player.
This sadly decreases the granularity of volume control since AdLib has far
less distinct volume levels as we. However, having music and sfx at the same
time increases the overall experience.
2014-06-04 01:49:31 +02:00
Johannes Schickel c281da662e SCUMM: Only reset rhythm state when music is stopped. 2014-06-04 01:49:31 +02:00
Johannes Schickel 5ab61bcea5 SCUMM: Allow music and sfx to be played at the same time in AD player. 2014-06-04 01:49:31 +02:00
Johannes Schickel 707cfd07ac SCUMM: Only stop music when requested in AD code. 2014-06-04 01:49:31 +02:00
Johannes Schickel a6ec34f424 SCUMM: Let music in AD code use the same HW channel allocation as SFX. 2014-06-04 01:49:31 +02:00
Johannes Schickel f78e12cd5c SCUMM: Dynamically allocate hw channels for SFX in AD player. 2014-06-04 01:49:31 +02:00
Johannes Schickel 02f47dd497 SCUMM: Allow multiple SFX to be played at once with AD.
Actually, even before this change it was possible. However, since we formerly
used the original channel specification it was not possible when two sfx were
started on the same channel. Now we can play such sounds simultaneously again.
This is a first step towards a AdLib support level we had when we tried to
convert SFX to MIDI to play it through iMuse. However, now we still play the
sound effects properly, i.e. they still sound like in the original.
2014-06-04 01:49:31 +02:00
Johannes Schickel b5ca6b01f9 SCUMM: Clean up how SFX are stopped in the AD player. 2014-06-04 01:49:31 +02:00
Johannes Schickel ecabacaddd SCUMM: Properly unlock sound resources when reusing sfx slots in AD code. 2014-06-04 01:49:31 +02:00
Johannes Schickel 99f9756992 SCUMM: Further cleanup in AD SFX code. 2014-06-04 01:49:30 +02:00
Johannes Schickel 7ad0e135e6 SCUMM: Further refactor AD SFX code. 2014-06-04 01:49:30 +02:00
Johannes Schickel c50f6af8f7 SCUMM: Always work directly on Channel data in AD code. 2014-06-04 01:49:30 +02:00
Johannes Schickel fa6779c7a7 SCUMM: Store hardware channel number explicitly in Channel structure in AD code. 2014-06-04 01:49:30 +02:00
Johannes Schickel f95d28b74e SCUMM: Replace some more constants with named enum values in AD code. 2014-06-04 01:49:30 +02:00
Johannes Schickel 7b96217c11 SCUMM: Fix sfx resource unlocking in AD player. 2014-06-04 01:49:30 +02:00
Johannes Schickel a1d36da506 SCUMM: Move notes into SFX channel structure in AD player. 2014-06-04 01:49:30 +02:00
Johannes Schickel 70789f3964 SCUMM: Further SFX note related cleanup in AD player. 2014-06-04 01:49:30 +02:00
Johannes Schickel ffbd6a8432 SCUMM: Only keep music data variable for music around in AD code. 2014-06-04 01:49:30 +02:00
Johannes Schickel 13af131775 SCUMM: Introduce symbolic names for channel/note states in AD code. 2014-06-04 01:49:30 +02:00
Johannes Schickel 703f1eef48 SCUMM: Slight cleanup in SFX register code in AD player. 2014-06-04 01:49:29 +02:00
Johannes Schickel e71c841ca0 SCUMM: Small cleanup in SFX note setup in AD code. 2014-06-04 01:49:29 +02:00
Strangerke 85b3526860 SCUMM: Janitorial - Remove trailing spaces 2014-02-16 18:39:02 +01:00
Filippos Karapetis 4f807ee53e SCUMM: More renaming for players
Rename "player" directory to "players", and reintroduce the "player_"
file prefix. This has been done after sev's request.
"players/player_foo.*" is more descriptive, and avoids potential name
clashes in libraries
2013-11-01 19:26:51 +02:00