566 Commits

Author SHA1 Message Date
SupSuper
8d17b6c48a AUDIO: Fix MSVC warnings
Fixes warning C4245: signed/unsigned mismatch
(seems in line with other decoders)
2019-05-09 18:13:10 +10:00
SupSuper
369ba0c4b7 AUDIO: Fix MSVC warnings
Fixes warning C4530: C++ exception handler used, but unwind semantics are not enabled
by disabling exceptions in the STL since ScummVM doesn't support them
2019-05-09 18:13:10 +10:00
D G Turner
3de51cefd7 AUDIO: Fix GCC Compiler Warning in FM-TOWNS PC-98 Soft Synth
This is another warning of the use of memset to clear a non-trivial
structure / class. This can be removed since the structure is cleared by
the constructor which will be called by the "new" so clearing this again
is redundant.
2019-05-07 22:41:42 +01:00
D G Turner
21450facee MT32: Fix GCC Compiler Warning regarding memset usage 2019-05-07 01:39:12 +01:00
athrxx
1cfa6c087a AUDIO: (FM-TOWNS/PC-98) - silence some compiler warnings 2019-03-22 21:03:54 +01:00
athrxx
73678257b9 AUDIO: (FM-TOWNS) - turn warning into debug message
(no need to bother users with something that is actually intended behavior)
2019-03-22 21:03:53 +01:00
athrxx
b388f6d454 AUDIO: (FM-TOWNS/PC-98) - really fix NDS port build 2019-03-08 00:33:36 +01:00
athrxx
5e04dbcc6b AUDIO: (FM-TOWNS/PC-98) - hopefully fix NDS port 2019-03-08 00:18:14 +01:00
athrxx
8d4418fa36 AUDIO: (FM-TOWNS) - cleanup 2019-03-07 21:28:49 +01:00
athrxx
1237eb496b AUDIO: (FM-TOWNS/PC-98) - initialize some uninitialized vars
(just to remove some analysis warnings)
2019-03-07 21:28:45 +01:00
athrxx
49e85f64cf AUDIO: (FM-TOWNS/PC-98) - allow individual operator frequencies
(also add some sanity checks and make some more adjustments for SCI audio driver)
2019-03-07 21:28:41 +01:00
athrxx
b789d50a55 AUDIO: (FM-TOWNS/PC-98) - fix valgrind warning
(This didn't come up with the targets supported until now, but it does come up with SCI PC-98 music)
2019-03-07 21:28:35 +01:00
athrxx
4a226aa835 AUDIO: (FM-TOWNS/PC-98) - more cleanup
sort and rename some methods and vars and move as much as possible from public to private section
2019-03-07 19:43:55 +01:00
athrxx
20b378a41a AUDIO: (FM-TOWNS/PC-98) - cleanup
Apart from some basic cleanup this commit reverts a somewhat unfortunate design decision I made. The Kyra/Hof/Lol PC-98 sound drivers shouldn't inherit from the emulator. This commit separates the driver from the emulator putting some common interface in between. This should allow easier implementation of other PC-98 sound drivers.
2019-03-07 19:43:44 +01:00
Torbjörn Andersson
9d94970c0f AUDIO: Fix compilation with Clang
Reported by angstsmurf.
2019-02-14 17:45:16 +01:00
Torbjörn Andersson
cc958f70ef AUDIO: Simplify _audioGain calculation
No need to explicitly set it to 1.0. (There may have been in an
earlier version, to avoid any possible rounding error. But if so,
that reason is long gone.)
2019-02-10 16:32:02 +02:00
Torbjörn Andersson
9785d5007a ZVISION: Boost volume for MPEG cutscenes
The high-resolution videos play back at much lower volume than the
original ones. This adds hard-coded values for how much to amplify
each cutscene. It's all done by ear, and it does introduce some
clipping, but I think it should be acceptable.

Of course, it could also be a problem with the audio decoder, so
this may be the wrong approach entirely.
2019-02-10 16:32:02 +02:00
athrxx
ccb2dab9d0 AUDIO: (Paula) - fix typo 2019-01-27 14:46:09 +01:00
Paul Gilbert
08db684864 GLK: Add support for secondary Blorb files separate from the gamefile
It also hads further support for playing AIFF files. However, the
Blorb files for Lurking Horror & Sherlock on the if-archive website
don't seem to be valid AIFF files, so sound doesn't play using them
2018-12-08 19:05:59 -08:00
Paul Gilbert
0cbd51641b GLK: FROTZ: Further sound handling 2018-12-08 19:05:59 -08:00
athrxx
f67ca1ba47 AUDIO: (FM-TOWNS) - remove wave memory limit
(This is basically an unnecessary emulation of a hardware limitation. EOB II will try to load approximately 70 KByte of samples for the outro sequence, which would lead to some missing sounds with the 64 Kbyte limit).
2018-11-14 17:22:19 +01:00
athrxx
cc25424dae AUDIO: (FM-TOWNS) - add error codes 2018-11-14 17:22:19 +01:00
Cameron Cawley
79a4e3f813 BACKENDS: Remove references to the GP32 backend 2018-11-04 21:38:45 +00:00
Torbjörn Andersson
6705b6df9e AUDIO: Add a separate AC-3 decoder
This code comes from clone2727's now defunct (?) ac3 branch.
2018-11-04 22:33:22 +01:00
Torbjörn Andersson
54d7336d08 AUDIO: Free strings with delete[] instead of free()
Because scumm_strdup(), unlike strdup(), allocates strings with
new, not malloc(). (CID 1395228, 1395233, 1395235, 1395236)
2018-08-27 06:43:47 +02:00
D G Turner
93ed8a2c47 AUDIO: Fix Compilation with Fluidsynth v1.1.6 or earlier.
The function signature for these functions was changed from (char *) to
(const char *) in the v1.1.7 release, so compiling against
Fluidsynth v1.1.6 or earlier requires the copying of the strings to
prevent compilation errors such as "error: invalid conversion from
'const char*' to 'char*'".

Normally, we would break compatibility with older versions as platforms
should be using the latest Fluidsynth v1.X release of v1.1.11.

However, since this is trivial to fix and prevents breakage for legacy
platforms, am restoring the string duplication with scumm_strdup().

Apart from this, we should look at the Fluidsynth v2.X releases
currently in RC testing as the API is now changed for this.
2018-08-20 22:31:15 +01:00
Colin Snover
a726b3bc89 AUDIO: Remove unnecessary string duplications in FluidSynth driver 2018-08-18 16:30:05 +02:00
Paul Gilbert
11e33ba3fc JANITORIAL: Removing trailing spaces after int casts 2018-08-17 20:30:20 -07:00
D G Turner
941fe1dd7e AUDIO: Fix Compiler Shadowing Warnings. 2018-07-30 09:27:31 +01:00
Thierry Crozat
0b6ef93b85 GUI: Use consistent capitalization for options
As discussed on the mailing list we should use title capitalization
only for push buttons and tabs and use sentence capitalization for
everything else.
2018-07-22 21:28:12 +01:00
Adrian Frühwirth
cee4d6b853 JANITORIAL: Fix trailing whitespace 2018-05-24 15:30:55 +02:00
Adrian Frühwirth
49116b4ae7 ALL: Use CLIP to clip volumes 2018-05-05 17:57:31 +02:00
Adrian Frühwirth
2d62b8efeb AUDIO: Silence compiler warning in Nuked OPL emulator 2018-04-21 01:24:21 +02:00
Adrian Frühwirth
9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
Vincent Bernat
9edd8eff01 AUDIO: add support for OPL2LPT
The OPL2LPT is an OPL2 chip plugged on a parallel port. It is
write-only but otherwise acts as a classic AdLib. This commit adds
support for this device.

User is expected to have the right permissions on the parallel
port. By default, the first suitable parallel port is used. It is
possible to override that with the hidden configuration setting
"opl2lpt_parport".

It depends on the presence of the libieee1284 library which abstracts
a bit parallel port handling. An alternative would be to access
directly /dev/parportX on Linux. This would amount of code but it
would be Linux-only.

Tested with Indy 3 and SOMI.
2018-04-08 09:17:19 +02:00
Adrian Frühwirth
28a3faa178 AUDIO: Really fix constant type in Nuked OPL emulator 2018-04-07 14:41:06 +02:00
Eugene Sandulenko
b1d2d56198 AUDIO: Specify constant type in Nuked OPL emulator 2018-04-07 12:40:28 +02:00
Eugene Sandulenko
52fc7e34d8 CONFIGURE: Do not even try to build Nuked OPL when disabled 2018-04-07 12:22:18 +02:00
Eugene Sandulenko
7f6d431fe3 JANITORIAL: Add missing endline 2018-04-07 09:53:46 +02:00
nukeykt
b2052bc66f AUDIO: Add Nuked OPL3 core 2018-04-07 09:34:00 +02:00
Cameron Cawley
9111998c49 DS: Fix compilation with devkitARM r47 2018-04-07 09:30:07 +02:00
nukeykt
e5bfead345 SCUMM HE: Use Miles AdLib driver 2018-02-04 12:56:06 +01:00
Joseph-Eugene Winzer
eef9e18340 AUDIO: Fixes Protracker Portamento effect
.period overflowed if .portaToNoteSpeed > .period in the else if case
2018-01-21 23:03:12 +00:00
Tarek Soliman
50d79c5f26 MT32: Update to munt 2.3.0
This uses upstream commit 939cc986d9ffd044f8c6149361127ad5d94e430f

Closes gh-1091
2018-01-03 10:40:23 -06:00
Tarek Soliman
b8e4821a5a MT32: Remove executable flag from source files 2017-12-20 22:09:03 -06:00
Colin Snover
a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Colin Snover
d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
Colin Snover
1871c7dfea AUDIO: Fix UB shift of negative integer in AdLib driver 2017-12-01 19:22:31 -06:00
Colin Snover
e42ade073c AUDIO: Fix uninitialized data structures in PacketizedMP3Stream
If the audio thread called to readBuffer before any packet had been
added to the stream, the state of the stream would be changed from
INIT to EOS. Later, when a packet was received, the state would go
directly from EOS to READY, skipping decoder init, leaving garbage
memory in the decoder structs and causing a crash of the decoder.

Fixes Trac#9653.
2017-11-19 20:53:02 -06:00
Colin Snover
9fc24e19f2 AUDIO: Fix data race in PacketizedMP3Stream 2017-11-19 20:53:00 -06:00