Commit Graph
178 Commits
Author SHA1 Message Date
athrxx 19643175a8 SCUMM: limit 'Unrecognized base tag' warning to valid cases
This warning will not only show up if a tag is actually unrecognized but also in cases where the tag is recognized, but the resource size is 0. This happens quite a lot in the Amiga version of MI2 with 'SOU ' tags.
2019-07-14 21:45:52 +02:00
Adrian Frühwirth 48db9f04ea SCUMM: Fix recent commit to compile under all circumstances 2018-06-06 20:53:14 +02:00
Adrian Frühwirth 788d85d6b8 SCUMM: Work around distorted speech on submarine in Indy4
The speech sample at VCTL offset 0x76ccbca ("Hey you!") which is used
when Indy gets caught on the German submarine seems to not be a VOC
but raw PCM s16be at (this is a guess) 44.1 kHz with a bogus VOC header.
To work around this we skip the VOC header and decode the raw PCM data.

Fixes Trac#10559
2018-06-06 18:20:20 +00:00
Adrian Frühwirth d433aedf37 SCUMM: Improve 'imuse play' debugger command error handling
This commit introduces the following (seemingly non-invasive) changes
to make the 'imuse play' debugger command more useful (i.e. don't crash
when trying to load the wrong kind of (sound) resource.

* ScummEngine::readSoundResource()
  Instead of fatally error()'ing upon hitting a non-sound resource type,
  e.g. a room header (0x524d4844 aka RMHD), we now only issue a warning().
  This enables the already existing dead code which properly returns 0
  (aka no resource loaded).

* ResourceManager::validateResource()
  Instead of fatally error()'ing upon hitting an illegal glob type we now
  only issue a warning() and return false (also existing dead code).
  All methods calling validateResource() check its return value so this
  seems like the right thing to do anyway.

* ScummDebugger::Cmd_IMuse()
  Instead of directly calling ensureResourceLoaded() we now call
  getResourceAddress() instead (which in turn calls ensureResourceLoaded()
  and handles other edge cases) and only attempt to play a sound if the
  returned pointer actually is valid.

Fixes Trac#10527.
2018-06-03 19:38:52 +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
Adrian Frühwirth 16eac57834 SCUMM: implement lipsync for v7 games 2018-01-31 16:38:07 +01:00
Giovanni Bajo 3a60637d77 SCUMM: really implement lipsync
It looks like the code was there, but it was never fully implemented
because _curSoundPos was never being incremented. Experimentally,
it looks like it works if it is a 60FPS counter.
2018-01-31 16:36:24 +01:00
Alexandre Detiste f8388db32b JANITORIAL: Typos
I've not fixed this one, maybe it's on purpose:

RELASE -> RELEASE

engines/mads/staticres.cpp:const char *const kGameReleaseTitleStr =
"GAME RELASE VERSION INFO";
2016-10-31 09:56:43 +01:00
Kirben 87c5540c2a SCUMM HE: Update sound flags and queue, for new settings. 2016-06-22 11:45:44 +10:00
Ori Avtalion 3ad6af92f2 SCUMM: Reduce audio header dependencies 2016-05-21 13:55:38 +03:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Matthew Hoops aa6ff44440 BACKENDS: Only expose one set of functions for AudioCDManager
Engines should only have to call one set of functions and not decide between the two. In fact, the 'emulation' API was documented to just call the 'real CD' API.
2016-03-13 13:57:19 +01:00
Alexandre Detiste 6c298e964f JANITORIAL: Typos detected with lintian & grep 2016-02-15 18:27:02 +01:00
Filippos Karapetis 2cbd2402a5 SCUMM: Remove trailing whitespace 2014-10-28 16:15:43 +02:00
Johannes Schickel 1efc311de0 SCUMM: Make sure digital SFX are played even when speech is muted.
This makes sure that digital SFX are started even when speech is muted (when
using subtitles only mode). This is, for example, noticable in the Sam&Max CD
intro.
2014-07-23 02:39:51 +02:00
Johannes Schickel e57e16e295 SCUMM: Use correct sound type for digital sfx.
This makes sure that digital sfx in pre digital iMuse games are using the SFX
sound type rather than the speech sound type. This allows proper volume
control.
2014-07-23 02:39:51 +02:00
Filippos Karapetis 44ac74119b SCUMM: Fix a subtle bug in Sound::getCDStatus() for Loom Steam 2014-07-05 14:44:59 +03:00
Filippos Karapetis 53d3ee07df SCUMM: Add support for CD audio tracks in the Steam versions of Loom
Many Thanks to Ben Castricum for the original patch
2014-07-04 23:33:43 +03:00
Johannes Schickel 3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +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
Filippos Karapetis 651bf89939 SCUMM: Move all players to a separate "player" directory
There are 34 player .cpp/.h player files, so they have been placed in
their own directory, to logically separate them from the rest of the
engine
2013-11-01 06:57:53 +02:00
Rodrigo Rebello be2f292457 SCUMM: Fix unused variable warnings 2013-10-03 01:47:02 -03:00
Johannes Schickel 80ab4c5242 SCUMM: Implement original AD AdLib output.
This implements the original AD output and enables it for Indy3 and Loom DOS.
It is not enabled for Monkey Island DOS because it would break multi MIDI
support. However, there are also drawbacks for Indy3. In the catacombs
we were able to play sfx (Indy walking around) and the background music
at once. This was not supported in the original player and thus also does
not work with this reimplementation.

This fixes bug #2027877 "INDY3: Non-Looping Sound Effects".
This fixes bug #1159581 "ADLIB: Adlib Emulation doesn't Respect Volume Settings"
for Indy3 and Loom.
2013-07-24 03:28:47 +02:00
Matthew Hoops 0031c41db8 COMMON: Change kPlatformPC to kPlatformDOS
"PC" was very ambiguous and now it matches what we show in the GUI.

This also corrects sword2's platform to Windows.
2013-05-02 18:43:10 -04:00
Torbjörn Andersson b75349383e SCUMM: Remove Mac version of MI1 from special case.
We no longer use iMuse for MI1 Mac so this never happens. The Mac
player can only play one song at a time, so it should be all right.
2012-11-14 22:12:46 +01:00
Torbjörn Andersson 493644295d SCUMM: Remove unnecessary check for Mac Loom
As clone2727 pointed out, the default case handles Loom. I guess it
was a special case before to *prevent* it from trying to play the
sound, and to keep some comments about the format.
2012-11-14 06:07:55 +01:00
Torbjörn Andersson b1d10e6a62 SCUMM: Add support for Mac Loom music and sound
It turns out that playing the Mac Loom music isn't particularly
different from playing the Monkey Island 1 music, except the data
layout is a bit different and there's no per-note volume.
2012-11-13 22:49:12 +01:00
Torbjörn Andersson 8bb595453b SCUMM: Added support for Macintosh music in Monkey Island 1
This is based on the old Mac0-to-General MIDI conversion that we used
to do (and which this patch removes), as well as the code for playing
the Monkey Island 2 and Fate of Atlantis Macintosh music. I'm not sure
how accurate it is, particularly in tempo and volume, but at this
point it seems to work pretty well. Looping music is perhaps a bit
off, but it was before as well.

There is an annoying drawn out note in the music when you're following
the shopkeeper, but that appears to have been there in the original as
well.
2012-11-11 13:56:06 +01:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops b105104534 SCUMM: Update comments 2012-09-20 12:00:13 -04:00
Matthew Hoops 2a9d98003e SCUMM: Restrict the Mac m68k v5 driver to MI2/Indy4
Shouldn't be used with MI1
2012-09-20 11:58:04 -04:00
Matthew Hoops fc6ab89b50 SCUMM: Add support for Indy4 Mac 68k sound 2012-09-20 11:48:00 -04:00
Johannes Schickel b5aaa1d7bc SCUMM: Don't play SBL effects in MI2 mac.
The original does not do this either.
2012-09-20 01:59:50 +02:00
athrxx ea275d2cda SCUMM: add missing free() 2012-01-15 13:36:58 +01:00
Johannes Schickel 09708f7224 SCUMM: Stream sfx/voice sounds from mouster.sou.
This fixes sound corruption when using the new VOC streaming code. It also
reduces the runtime memory needed for compressed sound files slightly, since
it does not preload them into memory anymore. This comes at the expense of one
file descriptor needed per sfx being played though.

Thanks to Kirben for his review and feedback.
2011-11-06 13:33:55 +01:00
Eugene Sandulenko 0f711c4a2e SCUMM: Fix warnings 2011-11-03 01:34:53 +00:00
Johannes Schickel f24f0f0582 SCUMM: Remove outdated comment. 2011-11-02 20:28:45 +01:00
Johannes Schickel 3e1405b939 AUDIO: Add default disposeAfterUse value to makeVOCStream again. 2011-10-09 21:24:06 +02:00
Johannes Schickel 221434a83f AUDIO: Remove unused makeVOCStream interface. 2011-10-09 21:23:29 +02:00
athrxx 149fdbfb60 SCUMM FM-TOWNS: fix another regression
(pcm sound effects broken in 69adb13c2f)
2011-09-17 21:15:46 +02:00
Johannes Schickel 0d887aa245 SCUMM: Fix AdLib output in (MI2/)Indy4 Amiga.
Indy4 Amiga features only ROL tracks, thus with
69adb13c2f the MIDI -> AdLib conversion was
broken. Fixed that now by allowing ROL tracks to be played on AdLib output for
Amiga games.

This probably also affected Monkey Island 2 Amiga, but I don't have it to test.
2011-08-19 14:39:35 +02:00
Matthew Hoops 8892f2ec70 SCUMM: Fix AdLib output for MI2/Indy4 Mac
A regression from 69adb13c2f
2011-08-16 10:44:20 -04:00
Johannes Schickel fdb2f735dc SCUMM: Remove unneeded check for CMS in readSoundResource.
CMS support is only available in games using readSoundResourceSmallHeader.
2011-08-08 20:15:24 +02:00
Eugene Sandulenko 192b245d51 SCUMM: Fix compilation 2011-08-06 11:39:37 +01:00
Eugene Sandulenko 0dafa7f80f ALL: Reduce audio/ header dependency 2011-08-06 11:30:42 +01:00
Eugene Sandulenko 78f1ea7690 OSYSTEM: extended installTimerProc() with timer ID parameter 2011-08-06 11:28:35 +01:00
Johannes Schickel b86de198a0 SCUMM: Fix up CMS player implementation.
It's much better now and hopefully quite close to the original when it comes
to the music part. The intro music of Loom and Monkey Island 1 EGA sounds fine
to me now at least.
2011-08-05 22:58:50 +02:00
Johannes Schickel 4faa2d5b42 SCUMM: Typos... thx clone2727. 2011-08-03 05:15:29 +02:00
Johannes Schickel e1d881a227 SCUMM: Added FIXME to our old AdLib resource conversion code.
We handle command 0x80 incorrectly, which results in sound effects never
looping. This is the cause for bug #2027877 for example. I add this FIXME
since it is (probably) non-trivial to fix and so it won't be forgotten.
2011-08-03 05:10:24 +02:00
Johannes Schickel 69adb13c2f SCUMM: Fix strange noise in Indy4 outro with AdLib/FM-Towns output.
Formerly we tried to play back a ROL resource on AdLib in this case, since the
game does not contain a ADL resource for the sound the game tries to play here.
The original does not exhibit this behavior, thus I changed it to behave the
same now.

Big thanks to eriktorbjorn for noticing and finding the cause of this problem.
Also thanks to Kirben for checking how the original behaved and _athrxx for
checking the FM-Towns version of Indy4.
2011-07-17 02:27:33 +02:00