aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/music.cpp
AgeCommit message (Collapse)Author
2019-08-07SCI: error dialog for missing sound patch/driver filesathrxx
After implementing such a dialog into the fb01 driver it did make sense to me to also have this as a feature for all other aftermarket drivers/patches. So now the sound drivers can report missing files after the failed open() call which will then be displayed in a dialog. Which will at least be more helpful than our usual error messages...
2019-07-22SCI: (CMS sound driver) - add support for SCI0athrxx
I haven't found an elegant and non-intrusive way to squeeze SCI0 support into LordHoto's existing code. The drivers are too different. So I made some rearrangements. The basic mechanisms of LordHoto's SCI1 code should remain the same as before, though. I only introduced some more classes, moved some code into these classes and renamed some things (mainly for myself, so as not to get confused). I fixed two voice mapping bugs in the existing driver code. The first bug in bindVocies() effectively hindered the driver from playing anything at all when the CMS_DISABLE_VOICE_MAPPING #define wasn't set (_voice[i].channel == 0xFF instead of _voice[i].channel != 0xFF). The second bug in unbindVoices() was not a complete show stopper, but the function simply did not "unbind the voice". The line which does the actual removal of the channel assignment was missing. The SCI0 driver portions have been tested with: PQ2, KQ4, LSL3, QFG1, ICE and COC. SCI_0_EARLY versions apparently don't support the CMS. At least I haven't seen a driver file so far. And there seems to be no no instrument patch resource. Although the latter issue needn't necessarily be one, since the patch data array in the driver is actually preset with data (which gets overwritten as soon as a patch file is loaded). Maybe this would work for SCI_0_EARLY. However, I haven't tested this, since I really would have have a look at a driver file first if one actually exists. For now, I have limited the driver to SCI_0_LATE. SCI1 has been tested with KQ5 and LSL5 (not extensively, just to see whether anything got broken and whether my voice mapping fixes work).
2019-07-17SCI: revert accidental commitsathrxx
2019-07-17SCI: (CMS sound driver) - add support for SCI0athrxx
I haven't found an elegant and non-intrusive way to squeeze SCI0 support into LordHoto's existing code. The drivers are too different. So I made some rearrangements. The basic mechanisms of LordHoto's SCI1 code should remain the same as before, though. I only introduced some more classes, moved some code into these classes and renamed some things (mainly for myself, so as not to get confused). I fixed two voice mapping bugs in the existing driver code. The first bug in bindVocies() effectively hindered the driver from playing anything at all when the CMS_DISABLE_VOICE_MAPPING #define wasn't set (_voice[i].channel == 0xFF instead of _voice[i].channel != 0xFF). The second bug in unbindVoices() was not a complete show stopper, but the function simply did not "unbind the voice". The line which does the actual removal of the channel assignment was missing. The SCI0 driver portions have been tested with: PQ2, KQ4, LSL3, QFG1, ICE and COC. SCI_0_EARLY versions apparently don't support the CMS. At least I haven't seen a driver file so far. And there seems to be no no instrument patch resource. Although the latter issue needn't necessarily be one, since the patch data array in the driver is actually preset with data (which gets overwritten as soon as a patch file is loaded). Maybe this would work for SCI_0_EARLY. However, I haven't tested this, since I really would have have a look at a driver file first if one actually exists. For now, I have limited the driver to SCI_0_LATE. SCI1 has been tested with KQ5 and LSL5 (not extensively, just to see whether anything got broken and whether my voice mapping fixes work).
2019-06-21ALL: revert accidental commitsathrxx
2019-06-21SCI: (CMS sound driver) - add support for SCI0athrxx
I haven't found an elegant and non-intrusive way to squeeze SCI0 support into LordHoto's existing code. The drivers are too different. So I made some rearrangements. The basic mechanisms of LordHoto's SCI1 code should remain the same as before, though. I only introduced some more classes, moved some code into these classes and renamed some things (mainly for myself, so as not to get confused). I fixed two voice mapping bugs in the existing driver code. The first bug in bindVocies() effectively hindered the driver from playing anything at all when the CMS_DISABLE_VOICE_MAPPING #define wasn't set (_voice[i].channel == 0xFF instead of _voice[i].channel != 0xFF). The second bug in unbindVoices() was not a complete show stopper, but the function simply did not "unbind the voice". The line which does the actual removal of the channel assignment was missing. The SCI0 driver portions have been tested with: PQ2, KQ4, LSL3, QFG1, ICE and COC. SCI_0_EARLY versions apparently don't support the CMS. At least I haven't seen a driver file so far. And there seems to be no no instrument patch resource. Although the latter issue needn't necessarily be one, since the patch data array in the driver is actually preset with data (which gets overwritten as soon as a patch file is loaded). Maybe this would work for SCI_0_EARLY. However, I haven't tested this, since I really would have have a look at a driver file first if one actually exists. For now, I have limited the driver to SCI_0_LATE. SCI1 has been tested with KQ5 and LSL5 (not extensively, just to see whether anything got broken and whether my voice mapping fixes work).
2019-05-02SCI: Change sendMidiCommand non-midi error to warnsluicebox
FPFP calls kDoSound SendMidi on non-midi sounds. Fixes bug #10952
2019-04-02SCI: add PC-9801 sound driverathrxx
(supports SCI1 for now)
2019-03-29SCI: Remove MidiDriver_AmigaMac platform inferencesluicebox
Tell MidiDriver_AmigaMac the game's platform instead of it attempting to infer this by which patch resources exist. Fixes bug #10925 where SQ3 German Amiga is treated as Mac because it happens to contain a patch 7 resource.
2017-10-06SCI32: Fix music volume not being restored after speech in TorinColin Snover
This was a regression introduced by d556dcc57bf50a03d81ab7a1ef59a9e5758465bf.
2017-10-04SCI: Play MIDI version of SCI0 sound resource if user prefers itRuud Klaver
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-07-07SCI32: Force General MIDI for games that support nothing elseColin Snover
* 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-07SCI32: Fix missing music in MGDXColin Snover
GM patch data is the same across all SCI32 games.
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-06-09SCI: Return the original master sound volume when mute is onColin Snover
2017-04-23SCI32: Fix race conditions in Audio32Colin Snover
2017-03-30SCI: Change default master MIDI volume to 15Colin Snover
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-30SCI32: Do not default to General MIDI for SCI2.1 gamesColin Snover
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-27SCI: Implement bounds-checked reads of game resourcesColin Snover
2017-01-09SCI32: Fix crashes and bad cel positioning in GK2 demoColin Snover
2016-07-08SCI: Set isSample when starting digital sample from soundInitSndWillem Jan Palenstijn
This fixes digital samples in at least QfG1, SQ3, LSL5. Bug #7159.
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-01-15SCI: Add a hack in music init for MUMG Deluxe, so that it startsFilippos Karapetis
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
2015-02-15SCI: Add more audio debugging outputWillem Jan Palenstijn
2015-02-15SCI: Only allow a single 'playBed' song in SCI1earlyWillem Jan Palenstijn
2015-02-15SCI: Allow channel remapping from audio thread tooWillem Jan Palenstijn
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-15SCI: Give songs that start playing later higher priorityWillem Jan Palenstijn
2015-02-15SCI: Add debugging outputWillem Jan Palenstijn
2015-02-15SCI: Handle voice limits differentlyWillem Jan Palenstijn
For playBed songs, SCI1early remappers didn't unmap the entire song when there weren't enough voices for a channel. Thanks waltervn.
2015-02-15SCI: Don't remap channels from playBed songsWillem Jan Palenstijn
2015-02-15SCI: Always re-sort playlist in soundPlayWillem Jan Palenstijn
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-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.
2015-02-14SCI: Match SSCI channel reset orderWillem Jan Palenstijn
It may or may not matter for a driver's voice mapping.
2015-02-14SCI: Avoid resetting already unused channelsWillem Jan Palenstijn
2014-10-28SCI: Remove trailing whitespaceFilippos Karapetis
2014-05-29SCI: kDoSound: only one sample at once - thx wjpMartin Kiewitz
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-27ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf.Johannes Schickel
2014-05-25SCI: Make debugging output conditionalWillem Jan Palenstijn
2014-05-25SCI: Fix voice mapping during midi channel remappingWillem Jan Palenstijn
This fixes the first Patti dream sequence piano song in LSL5 room 320.
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2014-01-06SCI: Fix memory leakWillem Jan Palenstijn
Thanks to digitall for testing.
2013-12-31SCI: Remove no longer necessary hackWillem Jan Palenstijn
2013-12-31SCI: Rewrite MIDI channel remappingWillem Jan Palenstijn
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-09-22SCI: revert fix music start codeMartin Kiewitz
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-22SCI: fix music start code fixes eq2 bug #3037267Martin Kiewitz
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-21AUDIO: Simplify SCI inFastForward flag by moving it to MidiParserWillem Jan Palenstijn
2013-09-15SCI: fix tabs in last commitm-kiewitz
2013-09-15SCI: disable signals when resuming music, so that debugger will work ↵m-kiewitz
properly for longbow intro