Commit Graph
180 Commits
Author SHA1 Message Date
Colin Snover 42180527c4 SCI32: Fix music volume not being restored after speech in Torin
This was a regression introduced by
d556dcc57b.
2017-10-06 22:11:02 -05:00
Ruud Klaver cedd9d3c40 SCI: Play MIDI version of SCI0 sound resource if user prefers it
If the user has "Prefer digital sound effects" disabled for a SCI0
game, do not play the digital sample version of a sound resource, if
such data is present. When the resource has only digital sample data
and no MIDI information, play the sample instead.

Closes gh-1022.
2017-10-04 23:29:38 -05:00
Colin Snover 07d6ffd989 SCI32: Force General MIDI for games that support nothing else
* MGDX has only GM music;
* KQ7 1.x's AdLib data is incomplete, so is not usable even though
  it is partially there

Fixes Trac#9789.
2017-07-07 13:28:54 -05:00
Colin Snover 90cd56e4b6 SCI32: Fix missing music in MGDX
GM patch data is the same across all SCI32 games.
2017-07-07 13:25:02 -05:00
Colin Snover d556dcc57b SCI: Switch SCI2 games to use Audio32
Upon investigation of Sound code across SCI32 games, it was
determined that there are actually (at least) 3 different
revisions, not just a single SCI2.1 version. This patch only
changes the parts of Sound code that are relevant to the correct
use of Audio32.

Fixes Trac#9736, Trac#9756, Trac#9767, Trac#9791.
2017-06-18 21:42:58 -05:00
Colin Snover 40566820a7 SCI: Return the original master sound volume when mute is on 2017-06-09 23:30:10 -05:00
Colin Snover eb9965274d SCI32: Fix race conditions in Audio32 2017-04-23 13:07:25 -05:00
Colin Snover 3de6f290e7 SCI: Change default master MIDI volume to 15
GK1 handles MIDI volume by changing the volumes of individual
sound objects, rather than by using the MIDI master volume. As a
result, the master volume needs to default to the maximum output
level in order for GK1 to play music at the correct volume.

This change does not affect earlier games, since SCI16 managed
MIDI volume via the master volume, and for these games the master
volume from ScummVM is synced at startup.
2017-03-30 19:46:27 -05:00
Colin Snover 4d062fc7a0 SCI32: Do not default to General MIDI for SCI2.1 games
The only SCI32 game that uses MIDI and does not support AdLib is
MGDX, and it its MIDI playback is currently broken regardless of
the synth setting.
2017-03-30 19:46:27 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover b818e54027 SCI32: Fix crashes and bad cel positioning in GK2 demo 2017-01-09 19:34:54 -06:00
Willem Jan Palenstijn 862f12c71b SCI: Set isSample when starting digital sample from soundInitSnd
This fixes digital samples in at least QfG1, SQ3, LSL5. Bug #7159.
2016-07-08 22:08:53 +02:00
Colin Snover 46551fd4b5 SCI32: Rewrite digital audio engine
This provides a complete implementation of kDoAudio through
SCI2.1mid, plus partial implementation of SCI3 features.

Digital audio calls shunted through kDoSound have also been
updated to go through the SCI32 audio mixer, though these shunts
are a bit hacky because the ScummVM implementation of kDoSound
does not currently match how SSCI kDoSound is designed.

It is probably possible in the future to just replace the SCI1.1
audio code (audio.cpp) with the new SCI32 code, since the major
differences seem to be that (1) SCI1.1 only supported one digital
audio playback channel (this is configurable already), (2) it
had extra commands for CD audio playback and queued sample
playback.
2016-06-20 21:02:21 -05:00
Filippos Karapetis 87de93e5f1 SCI: Add a hack in music init for MUMG Deluxe, so that it starts 2016-01-15 02:47:22 +02:00
Martin Kiewitz 0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Willem Jan Palenstijn f477de2009 SCI: Add more audio debugging output 2015-02-15 18:28:57 +01:00
Willem Jan Palenstijn d0cb5f51fd SCI: Only allow a single 'playBed' song in SCI1early 2015-02-15 14:14:28 +01:00
Willem Jan Palenstijn 1c5722f014 SCI: Allow channel remapping from audio thread too 2015-02-15 14:05:56 +01:00
Willem Jan Palenstijn 5028487038 SCI: Use sound resource priority by default for songs
SCI1 sound resources can have an embedded priority. We now use that by
default, unless an explicit DoSound/SetPriority call overrides it.
Thanks waltervn.

This fixes relative priority of songs in at least PQ3 room 29.

Also increase savegame version to 33.
2015-02-15 14:05:36 +01:00
Willem Jan Palenstijn 0018bb0f6f SCI: Give songs that start playing later higher priority 2015-02-15 14:01:44 +01:00
Willem Jan Palenstijn 0aadd20aea SCI: Add debugging output 2015-02-15 14:01:35 +01:00
Willem Jan Palenstijn b80e74af5d SCI: Handle voice limits differently
For playBed songs, SCI1early remappers didn't unmap the entire song when
there weren't enough voices for a channel. Thanks waltervn.
2015-02-15 13:57:11 +01:00
Willem Jan Palenstijn e42a512357 SCI: Don't remap channels from playBed songs 2015-02-15 13:57:11 +01:00
Willem Jan Palenstijn 5964cc239b SCI: Always re-sort playlist in soundPlay
Previously, it would only sort if a song wasn't already in the playlist.
Since initSound already adds it, this effectively prevented the list
from being sorted.
2015-02-15 13:57:03 +01:00
Willem Jan Palenstijn 58ef44eb8d SCI: Register and save playBed option to PlaySound
The playBed option is not handled yet, only stored. This increases
the savegame format version.
2015-02-14 16:06:55 +01:00
Willem Jan Palenstijn 26d55b09a8 SCI: Match SSCI channel reset order
It may or may not matter for a driver's voice mapping.
2015-02-14 16:06:55 +01:00
Willem Jan Palenstijn 84d2414a7d SCI: Avoid resetting already unused channels 2015-02-14 16:06:55 +01:00
Filippos Karapetis 9783f0bbd9 SCI: Remove trailing whitespace 2014-10-28 16:17:06 +02:00
Martin Kiewitz d1bab54a4a SCI: kDoSound: only one sample at once - thx wjp
Calling kDoSound(play) on a sample will stop currently playing sample
Fixes Space Quest 5 air-lock sound issue (bug #6464)
Thanks to wjp for tracking the issue down
2014-05-29 23:57:09 +02:00
Johannes Schickel daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
Willem Jan Palenstijn 0ba17d909a SCI: Make debugging output conditional 2014-05-25 12:59:39 +02:00
Willem Jan Palenstijn b0f1c28c79 SCI: Fix voice mapping during midi channel remapping
This fixes the first Patti dream sequence piano song in LSL5 room 320.
2014-05-25 12:52:42 +02:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Willem Jan Palenstijn 34f300b3d5 SCI: Fix memory leak
Thanks to digitall for testing.
2014-01-06 21:37:31 +01:00
Willem Jan Palenstijn 0dfd742b21 SCI: Remove no longer necessary hack 2013-12-31 13:52:37 +01:00
Willem Jan Palenstijn 857d2e7bef SCI: Rewrite MIDI channel remapping
This adds MIDI state tracking to allow channels to be temporarily
unmapped and later re-mapped when there are free device channels
available again.
2013-12-31 13:52:15 +01:00
Martin Kiewitz 551e263165 SCI: revert fix music start code
add workaround for eq2
the issue is known, but can't be properly fixed without rewriting the midiparser into a channel specific parser
previous commit caused issues in kq5/french and others
2013-09-22 20:13:33 +02:00
Martin Kiewitz f1b0a77408 SCI: fix music start code fixes eq2 bug #3037267
we start at offset 10 for sound SCI1 games. This is hardcoded in the interpreter. Also removing not handling signals on tick 0. This fixes Eco Quest 2 / Gonzales dancing in room 530. Thanks to wjp for the help.
2013-09-22 15:40:51 +02:00
Willem Jan Palenstijn 3792af8e95 AUDIO: Simplify SCI inFastForward flag by moving it to MidiParser 2013-09-21 09:31:08 +02:00
m-kiewitz 0fd15e6db3 SCI: fix tabs in last commit 2013-09-15 23:21:23 +02:00
m-kiewitz 0367d40647 SCI: disable signals when resuming music, so that debugger will work properly for longbow intro 2013-09-15 22:14:35 +02:00
Willem Jan Palenstijn 18feefbe40 SCI: Notify scripts of completed fade when aborting it
This tweaks a fix/workaround (commit 96540686) for bugs #3266480 and #3041738.
Also add CHECKME to verify the accuracy of this workaround further.

This fixes the regressions #3291115, #3555404, #3596335 and #3610063.
2013-04-06 20:31:34 +02:00
Filippos Karapetis 7824d0e8e9 SCI: Limit the hack used for sound initialization to the Fun Seeker's demo only 2012-09-01 20:17:27 +03:00
Filippos Karapetis 60c2061710 SCI: Allow the Fun Seeker's Guide demo to run
This demo doesn't have any music, and the original doesn't work with any sound
driver, so don't error out when the sound driver can't be initialized properly
2012-09-01 17:59:52 +03:00
Filippos Karapetis e41e412c9e SCI: Fix for bug #3522046 "Detection of SQ4CD as Windows breaks Music"
Fall back to the DOS soundtracks in Windows CD versions if the user picks
a non-General MIDI music device, as the Windows tracks only contain MIDI
music
2012-04-29 20:45:16 +03:00
Filippos Karapetis 8496b5c4d8 SCI: Rename _bMultiMidi to _useDigitalSFX and only initialize it inside SoundCommandParser 2011-12-28 13:14:55 +02:00
athrxx 6c23f78cb9 SCI: add Japanese MUMG detection entry and adapt Fm-Towns sound driver 2011-11-05 21:02:05 +01:00
Filippos Karapetis e674298a60 SCI: Fixed bug #3430834 - "SCI: KQ6: Music stops after leaving shop"
A regression from commit 9654068
2011-11-01 23:42:38 +02:00
athrxx b7ae744dea SCI: limit new FM-Towns driver to KQ5
Mixed up mother goose is reported not to use that driver and even crash when trying to use it.
Play Id and instrument patch id seem to be different.
2011-11-01 21:56:54 +01:00
athrxx 9b838239eb SCI: (KQ5 FM-Towns) - fix voice mapping
(Driver channels would get reserved via the 0x4b control, but they would never get released)
2011-11-01 20:31:59 +01:00