942 Commits

Author SHA1 Message Date
Hubert Maier
4f4949082e
AUDIO: Correct spelling mistake
wether -> whether

A wether is a male sheep which has had its sex organs removed.
2022-10-27 15:56:03 +02:00
Hubert Maier
5b98653ec3
AUDIO: Correct spelling mistake
loose -> lose
2022-10-27 15:56:03 +02:00
Hubert Maier
842aa95765
AUDIO: Correct spelling mistake
rythm -> rhythm
2022-10-27 15:56:03 +02:00
athrxx
4cacd66d0d AUDIO: code style fixes 2022-10-17 23:03:05 +02:00
athrxx
6984faf958 AUDIO: add data size arg to MidiChannel::sysEx_customInstrument()
As a safety check...

Also throw out some warnings when loading savegames
with instrument data for a different device (the savegame
incompatibility would be very nice to be fixed, but it is not
trivial.
2022-10-06 18:47:47 +02:00
athrxx
99dd6cb248 SCUMM: (IMS) - minor restructuring and cleanup
Currently, Roland MT-32 sound is broken for
SAMNMAX. Just try the intro song with shut off
speech. It is very obvious that it plays with a quite
reduced number of channels compared to the
original interpreter.

Now, due to the not-so-helpful code design (much
of the iMuse code has been drawn into the common
code) it has become increasingly difficult to fix Midi
related thing in iMuse. I have added more and more
crude hacks over time.

SAMNMAX requires more elaborate channel
allocation. To make it happen I have added driver
wrappers for Midi to the iMuse code.

Other than that, I have done only minor cleanup here.

Actually, I would have liked to withdraw much more
of the iMuse code from the common code and move
it to SCUMM (basically all the MidiChannel
stuff which is exclusively used by iMuse. But it turns
out that it is so thoroughly intertwined (the major
blocker here being the AdLib driver) that it requires
more thought and effort and would just distract me
from fixing the SAMNMAX sound.
2022-10-06 18:47:40 +02:00
athrxx
6484913762 SCUMM: fix bug no. 13867
This will actually read out of bounds in the orginal interpreter, too. I have fixed it to be more in line with the original (the value in question is always treated as unsigned here), but still not do anything harmful.
2022-09-30 03:06:21 +02:00
Roland van Laar
3285aae6d1 AUDIO: fix memory leak in aiff
Dispose of the AIFF stream properly by setting the disposeAfterUse flag
in all makeStream functions.
2022-09-20 22:13:31 +02:00
Le Philousophe
208cf8bd40 AUDIO: Initialize Cryo APC fields 2022-09-18 12:00:02 +02:00
D G Turner
3eb6f98e6f AUDIO: MT32: Restore Fix For Internal Sample Rate Converter Code
This was previously disabled implicitly by the missing define
symbols in the SampleRateConvertor module. This has now been enabled
to use the internal rate convertor code.

This was generating undefined macro warnings from GCC when -Wundef
was passed.
2022-09-16 06:22:22 +01:00
Lothar Serra Mari
d94505d46e AUDIO: MT32: Update MT32 emulation code to mt32emu 2.7.0 2022-09-15 11:52:47 +02:00
athrxx
7c5b367b54 AUDIO: (FM-TOWNS) - restore audio cd settings on exit
(The cd audio manager is a global object. It keeps its settings
when returning to the launcher)
2022-09-14 17:18:24 +02:00
athrxx
e052fee77f SCUMM: (IMS) - cleanup sound init process
Reduce abuse of the property function to set init vars.
Better distinction between drivers to prevent a GM init on
the Mac driver (which could happen depending on the
launcher sound setting).
2022-09-13 22:13:53 +02:00
athrxx
162e1bb764 SCUMM: (DOTT) - fix AdLib transpose/detune
Continued bug fixing for ticket no. 13460 ("Incorrect MIDI
pitch bending"). This time the AdLib part (which applies
to FM-Towns, too, since it is more or less the same driver).
This fixes the sound when the bird is dropping from the
sky in the DOTT intro.

Also separate the GM code for SAMNMAX a bit after
checking the original code.
2022-09-06 22:01:21 +02:00
Le Philousophe
cf61337968 CRYOMNI3D: Build fixes in HNM6 and APC decoders 2022-08-30 11:43:06 +02:00
Le Philousophe
399e02e2a5 CRYOMNI3D: Add HNM6 image and video codec
This also adds a Cryo APC decoder in shared code.
2022-08-30 11:02:32 +02:00
Scott Percival
f5a0bd236b AUDIO: Add virtual base class for looping audio
LoopingAudioStream and SubLoopingAudioStream now share a common base
class, and have the methods getCompleteIterations() and
setRemainingIterations().
2022-08-28 10:31:00 +00:00
Cameron Cawley
47755b4b38 COMMON: Make better use of inlining in BitStream functions 2022-08-28 00:05:31 +03:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
elasota
b0644919d6 AUDIO: Generate note channel to track mapping for type 1 MIDI 2022-07-02 17:25:18 +02:00
elasota
ab7e60da6f AUDIO: Add some more MIDI constants. 2022-06-29 16:39:43 +03:00
Coen Rampen
4375d7edc5 AUDIO: Fix VOC infinite loop
This fixes a possible infinite loop in VocStream. It depends on the stream size
matching the size specified in the VOC block headers, but if the size in the
headers is incorrect and larger than the stream size, it will keep trying to
read the stream. This is fixed by adding an end-of-stream check to the error
check.
2022-06-18 14:13:32 +02:00
Coen Rampen
79c778c6c9 AUDIO: Enable subclassing of VocStream 2022-06-18 14:13:32 +02:00
Einar Johan Trøan Sømåen
b3d026ae46 DIRECTOR: Implement AIFF mDuration.
This also means a refactor of the AIFF Audio-decoder, to expose
the two header fields we need to calculate the length.
2022-06-15 16:35:41 +02:00
Orgad Shaneh
b2322a8c4f JANITORIAL: Add some long casts to match %ld format
Needed on Win64 compilation.
2022-06-12 10:24:34 +02:00
Coen Rampen
89ddcb04ff AUDIO: Make module dtor virtual 2022-06-09 17:33:24 +02:00
Coen Rampen
caca2ea61f AUDIO: Make subclassing Module and ProtrackerStream easier
To implement a MOD variant for the Chewy engine, this commit makes some changes
to make subclassing of the ProtrackerStream and associated Module class easier.
2022-06-09 17:13:56 +02:00
Eugene Sandulenko
5e05f93f36
ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
Stephen Robinson
1ae637fb57 SCUMM: Lip syncing fixes for some HE games.
Backyard Baseball 2003 was missing dialog which was lip-synced to
animation. This was due to it using the WAV block alignment as a count
of bytes per sample. This is not true for the IMA ADPCM format used for
speech in Backyard Baseball 2003.
2022-05-23 23:22:18 +03:00
Donovan Watteau
5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Coen Rampen
021a828e2e AUDIO: Decouple CMS emulator from engines
This commit adds a mediator class to decouple the CMS emulator from the engines
that use it. This allows for easier updating or replacement of the emulator or
addition of new emulators. It also enables using the emulator via a callback
mechanism.
2022-05-16 12:18:10 +02:00
Coen Rampen
b2cf9a580b AUDIO: Add AdLib MS driver callback frequency
This change allows a consumer to specify the desired timer callback frequency
for the AdLib multisource MIDI driver.
2022-05-09 17:19:44 +02:00
Coen Rampen
27e14762e7 AUDIO: Add Casio MT-540/CT-460/CSM-1 MIDI driver
This adds a MIDI driver for the Casio MT-540, CT-460 and CSM-1 devices. These
are supported by Elvira 1 and several Sierra SCI0 games as well as Altered
Destiny and Les Manley 1.
2022-05-09 17:19:44 +02:00
Coen Rampen
5e1905f5f6 AGOS: Waxworks OPL3 mode instrument attack fix
This fixes the slow attack for several instruments, which causes some barely
audible notes in OPL3 mode.
2022-05-09 17:19:44 +02:00
Coen Rampen
d0c56f0bbc AUDIO: Remove GMF support from SMF MidiParser
This removes the code for the GMF MIDI format used by Simon The Sorcerer from
the SMF MIDI parser. The GMF format now has its own parser.
2022-05-09 17:19:44 +02:00
Coen Rampen
13da6f9cb5 AUDIO: Move null MidiDriver remove timer proc 2022-05-09 17:19:43 +02:00
Coen Rampen
32ba866499 AUDIO: Move MIDI parser source handling to superclass
This commit moves the source handling from the SMF and XMIDI parsers to the
MIDI parser superclass. This reduces code duplication.
2022-05-09 17:19:43 +02:00
Coen Rampen
6a9fc73962 AUDIO: Small MIDI driver enhancements and fixes
This commit adds the following functionality to the MIDI drivers:

- Add checking if a driver is ready to process MIDI events for a specific
source (rather than any source). To facilitate this, SysExes can now be sent
using a source number. This is stored with the SysEx data in the SysEx queue
and can be checked when isReady is called with a source number.
- Allow specifying controller default values per MIDI channel. Currently this
is only implemented for program.
- The OPL dynamic channel allocation algorithm will now respect statically
allocated channels, in case a subclass uses combined static and dynamic channel
allocation.

It also fixes the following bugs:

- Instrument remapping can now be specified using const arrays.
- OPL instrument writing code is refactored to a separate function.
- OPL note on with velocity 0 would be handled as a note off, and then
continued to be processed as a note on.
- OPL writeFrequency would always write key on bit, even if the note is not
active.
- MT-32 default channel volume was incorrect.
2022-05-09 17:19:43 +02:00
Coen Rampen
00a907f524 MIDI: Fix parser auto loop skipping first event
The auto loop functionality of the MIDI parser would call jumpToTick to jump
back to the start of the MIDI stream, then call parseNextEvent to read the
first MIDI event. However, jumpToTick already makes sure the first MIDI event
after the jump point is parsed. Calling parseNextEvent again would discard the
first and parse the second MIDI event.
Fixed this by removing the call to parseNextEvent after jumping to the start.
2022-05-09 17:19:43 +02:00
Coen Rampen
b55b1da128 AUDIO: Add arbitrary MIDI instrument remapping
This commit adds a function to the multisource MIDI drivers for specifying an
arbitrary instrument map for remapping the instruments in the MIDI data.

This is used for remapping instruments from two Simon 2 GM tracks to MT-32
because they are missing from the MT-32 MIDI data set.
2022-05-09 17:19:42 +02:00
Coen Rampen
8c4c80d844 AUDIO: Add determineDataSize to XMIDI parser
This is needed for Simon 2.
2022-05-09 17:19:42 +02:00
Coen Rampen
1f0e905160 AGOS: Add MIDI parsers for GMF and Windows
This commit adds MIDI parser subclasses for the Simon 1 GMF format and for the
SMF variant used by the Windows versions of Simon 1 and 2.

The GMF format was handled by the SMF parser, which can now be removed from
that class. It also fixes the tempos not matching the DOS interpreter.

The Simon Windows SMF variant was handled in the AGOS midi class. Moving it to
a separate parser allows for some cleaner code in that class. It now also
corrects the tempos to match those of the DOS interpreter.
2022-05-09 17:19:41 +02:00
Coen Rampen
734817597b AUDIO: Add rhythm mode support to AdLib MS driver
This adds support for the OPL rhythm mode to the AdLib multisource MIDI driver.
Some games (f.e. Simon 1) use this to generate the rhythm sounds of their music.
2022-05-09 17:19:41 +02:00
D G Turner
9af3ef5e88 AUDIO: MT32: Fix Undefined Macro Compiler Warnings
These were emitted by GCC when -Wundef was passed.
2022-03-21 21:37:04 +00:00
D G Turner
a1de9a95c6 AUDIO: MT32: Fix Internal Sample Rate Converter Code
This was previously disabled implicitly by the missing define
symbols in the SampleRateConvertor module. This has now been enabled
to use the internal rate convertor code.

This was generating undefined macro warnings from GCC when -Wundef
was passed.
2022-03-20 22:54:04 +00:00
NMIError
221fa4c841
AUDIO: Add support for RetroWave OPL3
This commit adds support for the SudoMaker RetroWave OPL3 sound card. Requires
the retrowave library.

Add the following settings to scummvm.ini:
retrowaveopl3_bus=serial
retrowaveopl3_port=<port> f.e. COM3 or ttyACM0
2022-01-29 17:33:29 +01:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Filippos Karapetis
9473b382b5 AUDIO: Remove unused variable
Thanks to eientei for reporting this
2021-12-24 03:25:22 +02:00
Quietust
3f4d59800d AUDIO: Add Paula per-channel DMA interrupts
These will be needed for proper emulation of the Amiga SCUMM V2/V3
sound engines.
2021-12-13 20:53:21 +01:00