aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
AgeCommit message (Collapse)Author
2017-09-27SCI32: Implement SCI3-variant volume handlingColin Snover
Trying to find differences in Lighthouse's audio sample playback, I discovered that SCI3 had its own variant of handling volumes and sending this volume information back to game scripts. It is not known if this fixes any sound bug.
2017-09-25SCI: SQ4: Now using additional and enhanced Win3.11 samplesMartin Kiewitz
Which were originally only played, when using the Windows interpreter. Afaik the DOS interpreter was incapable of playing more than 1 sample at a time, which was probably the reason why Sierra only added these for the Windows interpreter. For example a sample is now played, when points are awarded. Those samples are currently used all the time and will also enhance the game, when platform DOS is chosen. In case someone wishes to opt-out of this, we could add a game specific option. We do something like this for Space Quest 3 already, that's why I don't see a reason to add a game option right now.
2017-09-10SCI: Remove dead codeColin Snover
2017-06-18SCI: Fix looping of sounds that are not initialized yetColin Snover
This fixes at least the character selection screen in QFG4CD, where the sound for the torches is supposed to loop, but wasn't because kDoSoundSetLoop would bail out before setting the loop property on the soundObj.
2017-06-18SCI: Switch SCI2 games to use Audio32Colin Snover
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-04-23SCI32: Fix race conditions in Audio32Colin Snover
2017-04-21SCI: Improve audio volume & settings sync codeColin Snover
This patch includes enhancements to the ScummVM integration with SCI engine, with particular focus on SCI32 support. 1. Fixes audio volumes syncing erroneously to ScummVM in games that modify the audio volume without user action (e.g. SCI1.1 talkies that reduce music volume during speech playback). Now, volumes will only be synchronised when the user interacts with the game's audio settings. This mechanism works by looking for a known volume control object in the stack, and only syncing when the control object is present. (Ports and planes were researched and found unreliable.) 2. Fixes audio syncing in SCI32 games that do not set game volumes through kDoSoundMasterVolume/kDoAudioVolume, like GK1, GK2, Phant1, and Torin. 3. Fixes speech/subtitles syncing in SCI32 games that do not use global 90, like LSL6hires. 4. Fixes in-game volume controls in SCI32 games reflecting outdated audio volumes when a change is made during the game from the ScummVM launcher. 5. Fixes SCI32 games that would restore volumes from save games or reset volumes on startup, which caused game volumes to be out-of-sync with ScummVM when started. 6. ScummVM integration code for audio sync has been abstracted into a new GuestAdditions class. This keeps the ScummVM- specific code all in one place, with only small hooks into the engine code. ScummVM integrated save/load code should probably also go here in the future. Fixes Trac#9700.
2016-07-11SCI32: Fix broken background volume in Torin during speechColin Snover
2016-07-01SCI32: Fix audio fadingColin Snover
2016-06-20SCI: Minor cleanup of kDoSoundColin Snover
Replaces unused kernel calls to use kEmpty, and set correct signatures for SCI32 kernel calls.
2016-06-20SCI32: Rewrite digital audio engineColin Snover
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-12SCI: Fix uninitialized read in SoundCommandParserColin Snover
2016-04-14JANITORIAL: Reduce audio header dependenciesOri Avtalion
2016-03-08SCI: Separate the demos of QFG4, PQ4 and GK1 from their full versionsFilippos Karapetis
The demo versions of these games were using a very different engine - SCI1.1 vs SCI2/SCI2.1. Thus, we split them into different game IDs, to avoid mixing specific game checks for them, as well as specific game workarounds, which are different for the demos than the full versions. Also, the demos should be working when SCI32 is disabled. For these games, we don't use ADGF_DEMO, to avoid game IDs like foodemo-demo
2015-02-18SCI: Fix digital audioWillem Jan Palenstijn
Regression from 5028487038fd, where I assumed all songs were MIDI.
2015-02-15SCI: Fix sound object frame selector rateWillem Jan Palenstijn
Thanks waltervn. Verified against asm (QfG2, KQ6CD)
2015-02-15SCI: Use sound resource priority by default for songsWillem Jan Palenstijn
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-14SCI: Register and save playBed option to PlaySoundWillem Jan Palenstijn
The playBed option is not handled yet, only stored. This increases the savegame format version.
2014-06-01SCI: Silence a gcc conversion warningMatthew Hoops
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2013-11-23SCI: Make fade signal version check more preciseWillem Jan Palenstijn
2013-11-23SCI: Fix SCI1late fade complete signalWillem Jan Palenstijn
This fixes duplicate music playing in LauraBow2CD (#6462)
2013-09-21SCI: abbrev. ffs to FE and priority check fixm-kiewitz
2013-09-21SCI: sfx/music priority int16 fixes bug #3615038m-kiewitz
it seems that sound system up till SCI0_LATE uses int16, afterwards it seems they changed to byte main music object (conMusic) in Laura Bow 1 uses -1 as priority. This was truncated to 255 till now, which resulted in many sound effects not getting played, because those used priority 0
2013-06-19SCI: Implement the 4-param version of kDoSoundSendMidi - bug #3614447Filippos Karapetis
Many thanks to wjp for his help with disassembly
2013-06-18SCI: Add note about LSL1vga DoSoundSendMidiWillem Jan Palenstijn
2013-04-28SCI: Change wording for a function referenceFilippos Karapetis
2013-04-27SCI: Change wording for bug/further info referencesFilippos Karapetis
2013-04-19SCI: Replace workaround for bug #3605269 by script patchWillem Jan Palenstijn
2013-04-07SCI: Add signal/fade related CHECKMEWillem Jan Palenstijn
2013-04-06SCI: Minor cleanupWillem Jan Palenstijn
(Thanks waltervn)
2013-04-06SCI: Further clarify commentWillem Jan Palenstijn
2013-04-06SCI: Clarify commentWillem Jan Palenstijn
2013-04-06SCI: Revert "Fixed fading-related bugs #3267956 and #3041738"Willem Jan Palenstijn
This reverts commit bfef0f5a6fabdef5bb42cffd8b078d4511cf2a80.
2013-04-06SCI: Re-initialize more of MusicEntry on playWillem Jan Palenstijn
This fixes bug #3267956.
2013-04-06SCI: Revert "Added a more specific workaround for bug #3267956.[...]"Willem Jan Palenstijn
This reverts commit 5654e1257551bf176c7fd06c756612bec3d79033. Conflicts: engines/sci/sound/soundcmd.cpp
2013-04-06SCI: Revert "Clarify comment from rev 5654e12 further"Willem Jan Palenstijn
This reverts commit 9f74a6eda2355bb09b9b963be41509ed67016a6c.
2013-04-06SCI: Revert "Fix script bug #3555404 - "SCI: KQ6 Spider Scene Game Freeze""Willem Jan Palenstijn
This reverts commit 8524ebd699254a6786033f0e41b9a45c563feb11.
2013-04-06SCI: Revert "Properly fix bugs #3267956 and #3605377"Willem Jan Palenstijn
This reverts commit 17ca8d14b1e0d1960485029878c728ef4d6d6132, except for a minor unrelated change to the workaround for bug #3605269 Conflicts: engines/sci/sound/soundcmd.cpp
2013-04-06SCI: Revert "Add a hack to fix bug #3596335"Willem Jan Palenstijn
This reverts commit f019d5a4881c8ee42fa36ef0613d9e82b3b36297.
2013-04-05SCI: Revert "Add a more generic solution for the problem found in bug #3605269"Willem Jan Palenstijn
This reverts commit c6320a28e483e52b489cae8e86774008e030492b. SSCI does not interpret signals on other channels than 15. Conflicts: engines/sci/sound/soundcmd.cpp
2013-04-04SCI: Add a hack to fix bug #3596335Filippos Karapetis
Game scripts are waiting indefinitely for a song, thus we change its dataInc selector to prevent that from happening
2013-04-04Properly fix bugs #3267956 and #3605377Filippos Karapetis
SCI: Only stop after fading, if the song to be faded is faded down. Also, reset the song signal when fading starts. It was set to -1 when fading started in bug #3267956, thus it stopped immediately.
2013-04-02SCI: Add a more generic solution for the problem found in bug #3605269Filippos Karapetis
We now accept signals from all channels if channel 15 is missing. This is a very rare edge case, but our behavior is now somewhat closer to what the original interpreter seems to be doing. Mordack's appearance animation is now synced properly. The more generic workaround works for songs 1840 and 1843, but not for 1849, which is still problematic and we still resort to manually changing its dataInc selector
2013-04-01SCI: Set the song's sound queue signal to -1 when stopping a sound, like ↵Filippos Karapetis
SSCI does Previously, we set the signal of the sound objects themselves to -1, but set the sound queue's signal to 0. This now matches the original behavior.
2013-04-01SCI: Fix bug #3605269 - "SCI: KQ5 Windows CD - Game Hangs Before Final Battle"Filippos Karapetis
This is caused because songs 1840, 1843 and 1849 are all missing their special SCI signaling channel (channel 15), so the game scripts wait indefinitely for signals which are never set
2013-03-29SCI: Stop and clear sounds that have no data. Fixes an issue in KQ6 MacFilippos Karapetis
Thanks to waltervn and clone2727 for the original patch. Tested LSL5 with this change, and the problematic sound in the mud wrestling scene is handled correctly
2013-01-29SCI: Use correct priority selector in SoundCmdWillem Jan Palenstijn
It was using 'pri' instead of 'priority', apparently due to a selector number->name translation error from 544daa5c31. Thanks to waltervn for spotting this.
2012-10-22SCI: Fix bug #3578335 - "SCI: Mixed-Up Mother Goose EGA - crash upon ↵Filippos Karapetis
choosing kid" In several SCI0 games, the parameter to kDoSoundFade can be null. We handle that case, instead of adding individual workarounds per game
2012-08-20SCI: Set the correct audio type for SCI1.1 sound effects, fixing bug #3554709Filippos Karapetis
Now, sound effects in SCI1.1 games will no longer be incorrectly using the speech sound volume. This avoids them being silenced in floppy games that are flagged as not having speech. Fixes bug #3554709 - "SCI: Digital SFX don't play when Override Global Audio set"