Commit Graph
90 Commits
Author SHA1 Message Date
Cameron Cawley 06dab62e2e SCUMM: Move Player_V2CMS to the new CMS API 2022-11-29 00:12:19 +01:00
Cameron Cawley 277861c240 SCUMM: Change Player_V2Base to not inherit from Audio::AudioStream 2022-11-29 00:12:19 +01:00
Cameron Cawley 90620e0b5d SCUMM: Always build with Player_HE support 2022-11-16 09:29:02 +02:00
Orgad Shaneh 1dbd274849 SCUMM: Use inline member initialization in Player_Towns* 2022-10-18 15:27:48 +02:00
athrxx 829572057c SCUMM: minor code style fixes 2022-10-17 23:03:04 +02:00
athrxx e052fee77f SCUMM: (IMS) - cleanup sound init process
Reduce abuse of the property function to set init vars.
Better distinction between drivers to prevent a GM init on
the Mac driver (which could happen depending on the
launcher sound setting).
2022-09-13 22:13:53 +02:00
Donovan Watteau 5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Torbjörn Andersson b118133cdf SCUMM: Zero Mac instrument information if it can't be read from savegame
If we can't read the instrument pos/sub-pos information from the
savegame, it's probably safer to set them to 0 than to leave them
undefined.
2022-03-14 19:16:32 +01:00
Torbjörn Andersson c2b5a96f3c SCUMM: Fix regression in saving/loading Mac music
This applies to the Mac versions of Loom and The Secret of Monkey
Island. There was a regression some years ago that caused the channel
data to be saved twice, and the instrument data never.

Unfortunately, this does nothing to fix the savegames that were broken
by the regression.
2022-03-14 15:08:42 +01:00
antoniou79 43f9e6183d SCUMM: Fix CMS not playing a music midi track again
Possible fix for bug #10696
2022-01-10 12:13:16 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Quietust 66842c10ed SCUMM: rewrite player_v3a to match original
Now plays exactly the same as the original engines.

Notable changes:

- Switch to Audio::Paula from Player_MOD (which predated Paula).

- Music engine now works differently between Indy3 and Loom with regards
  to the handling of overlapping notes and limited sound channels.

- Music (and some sound effects) now play in stereo.

- Music now overrides sound effects, as in the original games.
2021-12-13 20:53:21 +01:00
Orgad Shaneh ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh c2e7eeb563 SCUMM: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
Torbjörn Andersson a4fa54550a SCUMM: Add support for Mac Loom low quality music
This is guesswork, but it seems like the first channel always contains a
complete rendition of the music. I think that's intended for low-end
Macs, while the other voices (four, but the last one never seems to be
used) is the standard version of the music.

It doesn't sound particularly good, and also not quite as with Mini vMac
(I'm not fully prepared to rule out emulation problems), but it seems
reasonably close.
2021-07-28 13:37:40 +02:00
Torbjörn Andersson 0c3872d515 SCUMM: Use the mixer's mutex in Player_AD
This is one of the players that has had problems with deadlocks
recently. I'm not very well versed in threaded programming, but arthxx
has promised to fix up some more players later. This one was used as
proof of concept because it deadlocks a lot.
2021-06-24 20:38:38 +02:00
Torbjörn Andersson 3ef517d2a1 SCUMM: Fix some memory leaks
I forgot to free the streams after asking the Mac resource manager for a
resource.
2021-05-17 18:44:29 +02:00
Torbjörn Andersson 819cfb8383 SCUMM: Initial work on Mac Loom font renderer
The main purpose of this set of changes is to refactor the code to make
it easier to pass the name of the Macintosh resource file to other parts
of the engine (it used to be hard-coded in the music players), and to
scale-up the graphics by 2.

The actual font rendering is almost completely broken.
2021-05-17 18:44:29 +02:00
Torbjörn Andersson ab94375aa7 SCUMM: Remove unnecessary include. 2021-05-06 15:21:07 +02:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Torbjörn Andersson d725cae79e SCUMM: Fix audio distortion in Loom for PC-Engine
There are two buffers when generating audio. The output buffer that
readBuffer() fills, and the sample buffer where new samples are
generated. The sample buffer is the larger of the two.

When readBuffer() is called, samples are copied from the sample buffer
to the output buffer. Usually it will copy some samples to the output
buffer, generate new ones to the sample buffer, and copy the remaining
ones needed to the output buffer.

At the end, the remaining samples in the sample buffer are moved to the
beginning of the buffer. It works out so that samples are always copied
from the beginning of the sample buffer to somewhere in the output
buffer.

But here's where things went wrong: If the sample buffer was not full,
but still contained enough samples to fill the output buffer, it would
still copy the last samples in the sample buffer. It should copy the
samples from right after the ones that had already been copied to the
output buffer.

I spent far too long beating my head against this bug, and I don't know
how well I've explained it here. But the audio corruption appears to be
gone now...

Foo
2021-01-29 14:42:17 +01:00
Bastien Bouclet 730a1ee4cc SCUMM: Add override keywords 2020-02-09 12:43:16 +01:00
D G Turner 59b639ed4d SCUMM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-23 11:56:16 +00:00
athrxx 21b5f9262c AUDIO: (FM-TOWNS/PC-98) - fix regression from 0e734722
My commit 0e734722 causes lockups in SCUMM (sometimes) and SCI (very often). I didn't like the way I had fixed this before, but in the end I now had to do it in a similar way.
2019-12-18 20:50:39 +01:00
athrxx 4ee4d2d9af SCUMM: (FM-Towns Audio) remove TODO
The audio track is not broken. LEC simply didn't make good  euphony music tracks for the FM-Towns. There is nothing we can do about that.

The TODO implies that someone should mess around with the audio data (change the composition?).
2019-07-14 21:45:48 +02:00
athrxx 01f99f1a0a SCUMM: imuse driver directory cleanup
- move mac, pc speaker and fm-towns ims sound drivers into separate directory

(AdLib and MT32/GM drivers are still too entangled with common code to be moved so easily, especially MT32/GM. It would require lots of changes to the common code and possibly to all engines using the MidiDriver class. So I leave that for now.)
2019-07-14 21:45:43 +02:00
Paul Gilbert 11e33ba3fc JANITORIAL: Removing trailing spaces after int casts 2018-08-17 20:30:20 -07:00
Adrian Frühwirth 7df014ea6d SCUMM: Clarify workaround for Venice music in Indy 3 FMTOWNS 2018-07-02 14:45:54 +02:00
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
Adrian Frühwirth 49116b4ae7 ALL: Use CLIP to clip volumes 2018-05-05 17:57:31 +02:00
Eugene Sandulenko e7eaff13bf JANITORIAL: Fix code formatting 2018-02-04 12:59:57 +01:00
nukeykt e5bfead345 SCUMM HE: Use Miles AdLib driver 2018-02-04 12:56:06 +01: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
Colin Snover 0eda63bed1 SCUMM: Fix race condition in MOD player
Fixes Trac#6272.
2017-11-12 23:15:05 -06:00
Eugene Sandulenko 92353cf88b SCUMM: Fix more initialization 2016-11-19 17:33:45 +01:00
Eugene Sandulenko cead687df0 SCUMM: Fix CMS player initialization 2016-11-19 17:32:00 +01:00
Eugene Sandulenko cad834a69c JANITORIAL: Fix include statements 2016-09-03 15:19:37 +02:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Ori Avtalion 253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03: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
Alexandre Detiste 6c298e964f JANITORIAL: Typos detected with lintian & grep 2016-02-15 18:27:02 +01:00
Eugene Sandulenko 5675fa7b7f SCUMM: Enforcing numbers to double 2015-11-27 23:07:02 +01:00
athrxx fb61f64903 SCUMM: WORKAROUND for bug #1873 INDY3 FMTOWNS: Music in Venice is distorted 2015-11-10 18:00:01 +01:00
athrxx 4ec41c291e AUDIO: (FM-TOWNS) - cleanup euphony code
(rework parts of the code + improve naming of variables/functions)
2015-11-09 18:41:06 +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