aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/ksound.cpp
AgeCommit message (Collapse)Author
2018-11-13SCI: Fix Fall Through Compiler Warnings.D G Turner
2017-10-06SCI32: Clean up Audio32Colin Snover
* Rewrap comments to 80 columns * Remove resolved TODOs * Use containers and smart pointers where appropriate
2017-09-24SCI32: Disable all SCI32 Mac codeColin Snover
This code is currently untestable and is almost certainly at least partly based on guesswork & not actual reverse-engineering (as was the case for all other pre-2015 SCI32 code), so future developers interested in adding SCI32 Mac support should use it only as an intermediate reference rather than as known good code.
2017-09-24SCI32: Implement per-channel audio panningColin Snover
Used by RAMA, in various places, starting with the refrigerator at base camp after the cable car at the beginning of the game.
2017-06-09SCI32: Implement kLock & kDoAudio(1) for SCI32Colin Snover
1. Unlocking all resources of a type using a resource ID of -1 is gone in SCI32; 2. Audio locks need to be serialized starting in GK2 for the game's modified kDoAudio(1) call; 3. Audio locks in SCI3 must work more like SSCI, since at least Lighthouse's `BackMusic::fade` method will attempt to unlock audio that was never locked by a script. In SSCI (and now in ScummVM too) this is a no-op; previously in ScummVM, it would remove Audio32's own lock on the audio resource, resulting in a use-after-free; 4. kDoAudio(1) starting in GK2 returns the number of active *not-in-memory* channels being played, not the total number of active channels. Fixes Trac#9675.
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.
2017-01-09SCI32: Fix kSetLanguageColin 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-19SCI: Split audio sync to its own classColin Snover
SCI32 has its own audio handling code, but audio sync code is the same as SCI16.
2016-02-24SCI: Fix FM-Towns audio language selectionMartin Kiewitz
This first of all combines both detection entries and makes it possible so that the user can directly choose English or Japanese without having to add the game twice. But it also fixes the in-game option to switch between English and Japanese. Prior to this commit it was only possible to for example switch from Japanese to English once, but it was not possible to switch back without quitting the game and starting it again.
2016-02-22SCI: Make Pharkas CD opcodes return explicit values. Document.Lars Skovlund
2015-12-29SCI32: split up SCI2.1 into EARLY/MIDDLE/LATEMartin Kiewitz
- 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
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2013-04-28SCI: Fix Phantasmagoria Mac's kDoSoundMatthew Hoops
2013-04-15SCI: Add missing breakWillem Jan Palenstijn
2012-07-25SCI: Silence some very chatty warningsFilippos Karapetis
Also, add an example room where kRemapToGray is called
2012-06-11SCI: Add more verbose debug output for DoAudio in SCI2.1Filippos Karapetis
2011-11-01SCI: add Japanese detection entry for KQ5 FM-Towns and fix audio language ↵athrxx
handling
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-28JANITORIAL: Reduce header dependencies in shared codeOri Avtalion
Some backends may break as I only compiled SDL
2011-02-10SCI: Added resource manager support for changing the audio directory ↵Filippos Karapetis
dynamically. Also, moved some audio-specific resource code inside resource_audio.cpp This functionality is used by kSetLanguage(), called when switching the language in MUMG Deluxe from the game's main menu. svn-id: r55872
2011-02-09AUDIO: Rename sound/ dir to audio/Max Horn
svn-id: r55850
2011-01-08SCI2.1: Some functionality for Phantasmagoria 1 and MUMG DeluxeFilippos Karapetis
- Added a stub for kSetLanguage, used in MUMG Deluxe - this needs support at the resource manager level - Made kGetSierraProfileInt a stub function (it's used in the Windows version of Phantasmagoria 1 to override the video speed setting obtained from kGetConfig) svn-id: r55161
2011-01-01SCI: debugC calls no longer require a debug level of 2 to show outputFilippos Karapetis
svn-id: r55086
2010-11-24SCI: some changes to the way reverb is handledFilippos Karapetis
- "Invalid" SCI reverb values (127) are properly handled now - SCI kDoSound(reverb) sets the global reverb (renamed it accordingly) - kDoSound(reverb) can also return the current reverb if no parameter is sent svn-id: r54457
2010-08-02SCI: Silenced some sound related warnings. Added an empty function for ↵Filippos Karapetis
kDoSound(Restore), called when restoring games svn-id: r51661
2010-07-30SCI: Updated some comments related to Freddy Pharkas and silenced warning ↵Filippos Karapetis
for kDoAudio subop 13 svn-id: r51499
2010-07-20SCI: renaming kDoSound(resume) to resumeAfterRestoreMartin Kiewitz
kDoSound(resumeAfterRestore) is called right after restoring a saved game for sound-sci0 games, we already resume playing music inside restore, so we don't need to implement this at all svn-id: r51058
2010-07-09SCI: implemented subsignatures for kDoSoundMartin Kiewitz
svn-id: r50755
2010-07-08SCI: part of subfunction signature&mapping implemented, little cleanupMartin Kiewitz
svn-id: r50750
2010-07-08SCI: hopefully fix build :PMartin Kiewitz
svn-id: r50747
2010-07-08SCI: sorted kernel map alphabeticallyMartin Kiewitz
svn-id: r50746
2010-06-29SCI: Made the SoundCommandParser a member of the SciEngine class and removed ↵Filippos Karapetis
it from the EngineState, since it's static throughout the course of a game svn-id: r50484
2010-06-22The volume subop of kDoAudio returns the previous volume in SCI2.1, but not ↵Filippos Karapetis
in earlier versions svn-id: r50141
2010-06-21In SCI32, kDoAudio subop 10 is no longer CD audio. Just stub it off for now.Matthew Hoops
svn-id: r50134
2010-06-18SCI: Rewrap some overlong commentsMax Horn
svn-id: r50012
2010-06-18Fixed invalid memory access in SQ6Filippos Karapetis
svn-id: r49986
2010-06-17Strict mode: Turned several severe errors (almost all detection related) ↵Filippos Karapetis
into errors, instead of warnings svn-id: r49972
2010-06-17Fixed wPlayAudio, and added some documentation on the 3 new kDoAudio subops. ↵Filippos Karapetis
Digital sounds in Pharkas work again svn-id: r49928
2010-06-12Added debug output to kDoAudio and some music commands. Also added a warning ↵Filippos Karapetis
when an audio stream can't be created. Finally, the debug level of the MIDI parser debug output has been raised to 4, as it's too verbose svn-id: r49605
2010-06-10kSciAudioWPlay should not actually play the song, but 'pre-load' it. We fake ↵Matthew Hoops
the pre-loading with a flag that will return 0 if the song has been called with kSciAudioWPlay. Fixes the dream sequence sound in MUMG. svn-id: r49583
2010-06-10Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, ↵Filippos Karapetis
some camelCase changes svn-id: r49568
2010-05-18Added the number of parameters passed in unknown kDoAudio subopsFilippos Karapetis
svn-id: r49083
2010-02-15SCI: Remove sound/audio.h include from engine/state.hMax Horn
svn-id: r48063
2010-02-14Moved the reference to AudioPlayer inside SciEngine (as it doesn't have a ↵Filippos Karapetis
state, per se, and is static) svn-id: r48059
2010-02-13SCI: Move language related code from EngineState to SciEngineMax Horn
svn-id: r48052
2010-02-13SCI: Move GameFeatures from EngineState to SciEngineMax Horn
svn-id: r48049
2010-02-13SCI: Get rid of EngineState::resManMax Horn
svn-id: r48048