Commit Graph

342 Commits

Author SHA1 Message Date
Torbjörn Andersson
f7b96c57f7 MT32: Don't show LCD messages on-screen if they contain only spaces
E.g. the first message in Operation Stealth. It just looks like
something went wrong.
2021-06-12 13:14:51 +02:00
Cameron Cawley
c38e3bdc2a AUDIO: Support building with FluidLite 2021-04-25 20:39:55 +03:00
Lothar Serra Mari
24a27f6568 MT32: Fix definitions 2021-04-10 16:09:54 +02:00
Lothar Serra Mari
357744069c MT32: Update munt emulation code to libmt32emu 2.5.0 2021-04-10 16:09:54 +02:00
Le Philousophe
d0d38b0199 FLUIDSYNTH: Fix compilation with Fluidsynth 2.2
We replace deprecated functions as well
2021-04-08 21:04:41 +02:00
Le Philousophe
631b13b5f4 FLUIDSYNTH: Simplify FluidSynth version check 2021-04-08 21:04:41 +02:00
Thierry Crozat
6ef406ac20 AUDIO: Fix compilation with Fluidsynth2 2021-03-09 11:32:57 +00:00
sluicebox
a3bc5d64b8 FLUIDSYNTH: Fix build 2021-03-08 21:00:59 -08:00
Torbjörn Andersson
21d65cedf2 FLUIDSYNTH: Swapped debug levels for FLUID_WARN and FLUID_INFO
If FLUID_INFO is "verbose informational messages", perhaps they should
be better hidden from the average user than warnings. Particularly since
warnings are the only kind I've actually seen in the wild. (Change
suggested by criezy.)
2021-03-08 22:04:02 +00:00
Torbjörn Andersson
08b54f489b FLUIDSYNTH: Make FluidSynth logging less noisy by default 2021-03-08 22:04:02 +00:00
Lothar Serra Mari
b367e47eb1 MT32: Update Munt emulation code to libmt32emu 2.4.2 2021-01-17 16:55:26 +01:00
Cameron Cawley
6bb9c74cc3 MT32: Remove setting the palette when the driver is initialized 2021-01-05 02:07:55 +02:00
Lothar Serra Mari
ebce9c8ef3 MT32: Re-apply patches for silencing various GCC and MSVC warnings
I really should send them upstream.
2020-10-17 18:17:18 +02:00
Lothar Serra Mari
5bd94ed311 MT32: Update Munt emulation code to version 2.4.1 2020-10-17 18:17:18 +02:00
athrxx
38ddb196b3 AUDIO: (FM-TOWNS) - whitespace 2020-09-08 23:02:34 +02:00
athrxx
85755c893a AUDIO: (FM-TOWNS) - make use of Common::ObjectPool 2020-09-08 23:02:33 +02:00
Torbjörn Andersson
58a77abded FLUIDSYNTH: Prefer in-memory SoundFont data over global setting
When an engine provides in-memory SoundFont data, use that unless a
SoundFont has been explicitly configured on the current game. Otherwise
a global SoundFont setting will always override it. Even overriding the
MIDI settings for the game and leaving the SoundFont setting blank did
not work for me.
2020-09-02 10:01:33 +02:00
Vladimir Menshakov
201d2675ad AUDIO: Replace memsets on structures with ctors with ARRAYCLEAR() 2020-08-31 21:57:14 +01:00
Thierry Crozat
f3cfe11ee6 I18N: Consistency fix for SoundFont in messages 2020-08-31 16:35:56 +01:00
Eugene Sandulenko
8d27246a83 I18N: Adding full stops to the messages 2020-08-31 12:16:45 +02:00
aryanrawlani28
68d01321d6 GUI: U32: Downscale changes of U32, fix review issues
This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
2020-08-30 14:43:41 +02:00
aryanrawlani28
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
185fb72783 GUI: U32: Improve U32 code
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
Eugene Sandulenko
858954eec1 AUDIO: Properly warn user and act gracefully when soundfont is not specified.
Fixes #7127
2020-08-29 17:55:33 +02:00
Eric Fry
bd4939a2a4 AUDIO: FluidSynth Don't accept soundfont data if using version 1.x 2020-08-19 23:51:04 +10:00
Eugene Sandulenko
44e21a499d AUDIO: Added override keywords 2020-08-19 12:34:58 +02:00
Cameron Cawley
65164e00d4 AUDIO: Fix unused functions with older FluidSynth versions 2020-08-01 20:32:09 +01:00
athrxx
b379b52938 AUDIO: preparations for SegaCD sound driver 2020-07-30 22:19:21 +02:00
athrxx
5e276286ae AUDIO/GUI: add SegaCD sound settings 2020-07-30 22:19:21 +02:00
athrxx
edc0c5dc91 AUDIO: (FM-TOWNS) - fix pcm rate 2020-07-30 22:19:12 +02:00
D G Turner
e086dbfcd5 AUDIO: Fix Signed vs. Unsigned Comparison Compiler Warning in Fluidsynth 2020-06-16 22:03:04 +01:00
Lothar Serra Mari
b0b0e573fb MT32: Add missing default switch cases
See 4d911012e2 for reference.
2020-06-07 00:55:45 +02:00
Lothar Serra Mari
d831c5984e MT32: Fix MSVC warning
see 369ba0c4b7 for reference.
2020-06-07 00:55:45 +02:00
Lothar Serra Mari
cc5299961e MT32: Update to libmt32emu 2.4.0 2020-06-07 00:55:45 +02:00
Eric Fry
66f880812a AUDIO: Fixed formatting for sf loader functions.
Don't include sf loader support if compiling with fluidsynth 1.x
2020-06-05 20:57:54 +10:00
Eric Fry
d18f9734a1 AUDIO: Add ability for engine to supply its own soundfont data.
Add MDT_PREFER_FLUID to allow engines to indicate they prefer the fluidsynth driver.
2020-06-05 20:57:54 +10:00
Thierry Crozat
03cf6531a5 AUDIO: Fix mismatching malloc/delete[] 2020-04-27 23:06:15 +01:00
Eugene Sandulenko
4da444f238 AUDIO: Added override keywords 2020-03-09 16:08:19 +01:00
Zvika Haramaty
3b4810aab4 AUDIO: Added dump-midi mechanism
This mechanism is enabled by '--dump-midi' command line parameter.
The midi events are printed to screen, and dumped to 'dump.mid' file.
2020-02-28 08:27:12 +02:00
athrxx
8014f12df3 AUDIO: (FLUIDSYNTH) - limit config.h include to builds that need it
makes life a bit more convenient for some MSVC users (or at least for me)
2019-12-20 15:30:48 +01:00
athrxx
6193b6ce22 AUDIO: fix AmigaOS build 2019-12-18 21:40:03 +01:00
athrxx
21b5f9262c AUDIO: (FM-TOWNS/PC-98) - fix regression from 0e734722
My commit 0e734722 causes lockups in SCUMM (sometimes) and SCI (very often). I didn't like the way I had fixed this before, but in the end I now had to do it in a similar way.
2019-12-18 20:50:39 +01:00
athrxx
1083b94cbf AUDIO: (FM-TOWNS/PC-98) - set enum members to fixed values 2019-12-18 20:50:39 +01:00
athrxx
900dcc4de5 AUDIO: (FM-TOWNS/PC-98) - improve timer flags handling
Timers should be reset only the first time the enable flag is sent. This also requires some updates to drivers which didn't send these flags accurately.
2019-12-18 20:50:39 +01:00
athrxx
711034b74d AUDIO: (FM-TOWNS/PC-98) - improve sound quality
- Increase internal sample rate to dividers of the actual chip clocks and fix other related things. This seems to improve certain sfx/noise generator like sounds. The performance still seems to be okay.
- Fix feedback glitch that caused some noise with certain instrument patches when playing short notes.
- Fix squarewave sound glitch (mute channels when volume is zero; this could also cause unnecessary noise).
- Some cleanup.
2019-12-18 20:50:39 +01:00
D G Turner
68758a879e AUDIO: Really Fix Compilation Against Fluidsynth v2.1+
The previous fix did not work as the forbidden exception had no effect
since scummsys.h and thus forbidden.h had already been included prior
to the fluidsynth header being included. This also meant that undefining
the exception define after the header would have had no effect anyway.

This new solution was suggest by eriktorbjorn on bug #11278 and should
avoid the need to add an exception which would persist over the entire
source file.
2019-12-17 04:21:04 +00:00
D G Turner
8593a9e1e4 AUDIO: Fix Compilation Against Fluidsynth v2.1+
This is as reported by eriktorbjorn.
2019-12-15 22:22:20 +00:00
Cameron Cawley
f2b9f7bb76 BACKENDS: Remove the Windows CE port 2019-11-17 22:33:56 +01:00
D G Turner
28287d70b6 AUDIO: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 08:20:01 +00:00
D G Turner
4d911012e2 MT32: Add Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-04 03:51:40 +01:00
athrxx
d097768e1f AUDIO: (FM-Towns/PC-98) - deconstructor/race condition fix
(move mixer calls before mutex lock, since the mixer has a mutex of its own)
2019-08-25 11:58:19 +02:00
athrxx
0e73472207 AUDIO: (FM-Towns/PC98) - cleanup mutex handling 2019-08-07 16:43:06 +02:00
D G Turner
a769bace7f AUDIO: (FM-TOWNS) Fix GCC Compiler Warning with Copy Assignment 2019-08-03 16:09:17 +01:00
athrxx
01f99f1a0a SCUMM: imuse driver directory cleanup
- move mac, pc speaker and fm-towns ims sound drivers into separate directory

(AdLib and MT32/GM drivers are still too entangled with common code to be moved so easily, especially MT32/GM. It would require lots of changes to the common code and possibly to all engines using the MidiDriver class. So I leave that for now.)
2019-07-14 21:45:43 +02: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
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
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
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
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
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
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
Eugene Sandulenko
edeb6a636c AUDIO: Fix insufficient memset length in FM-TOWNS synthesizer 2017-08-11 21:55:59 +02:00
Torbjörn Andersson
665f5c99b2 JANITORIAL: Silence some more GCC 7 fall through warnings
I think these are the last one that were already flagged as being
deliberate.
2017-08-06 16:54:38 +02:00
Willem Jan Palenstijn
867511d2d0 MT32: Update Munt to 2.0.3
This update uses upstream commit
777c51cdb4dbb4e02a53c23edea9086f0b600e26.

The new SampleRateConverter is added, but not built as we don't use it.
Also, building it without source changes will need additional include
directories.

This update of Munt reduces the stack size, and thus fixes bug #9630.
2017-02-28 18:40:04 +01:00
D G Turner
77818e9683 MT32: Fix Set-But-Unused Compiler Warning. 2017-01-14 09:14:02 +00:00
Colin Snover
b93f4f06e4 MT32: Really add the virtual destructor 2016-12-18 10:25:58 -06:00
Colin Snover
d585c6f852 MT32: Fix virtual dtor warning, incorrect delete, unnecessary allocation 2016-12-18 10:20:23 -06:00
Eugene Sandulenko
f98730028c MT32: Prevent Munt from including <fstream> 2016-12-17 20:32:04 +01:00
Colin Snover
1e23c91914 MT32: Fix driver to be thread-safe 2016-12-16 15:44:29 -06:00
Colin Snover
b8d70d26fa MT32: Update Munt to 2.0.1-pre
This update uses upstream commit
f88ef828a600ce66d1f730c8fb2a7f580f6f6165.

This update switches to use the new Munt C++ interface, which
will allow ScummVM to link to an external Munt library instead
of requiring it to be built-in in the future. For the moment,
the emulator is still built-in, since it is not available from
most package repositories.

The Munt driver in ScummVM now uses writeSysex instead of the
(now-private) playSysexWithoutFraming, per recommendation from
the Munt team <https://github.com/munt/munt/pull/30>.

This changeset also removes direct modifications that used to be
made to Munt code, to ease future updates. To update Munt code in
the future:

1. Replace all source files in the `softsynth/mt32` directory with
   new files from the upstream `mt32emu/src` directory;
2. Update `config.h` with the correct version number for the new
   version of Munt;
3. Update `module.mk` to add any new source files that need to be
   built.
2016-12-16 15:44:29 -06:00
Colin Snover
df4a503622 Revert "MT32: Update Munt to 2.0.0"
This reverts commit b4dbd6d3c2.
2016-11-25 12:24:08 -06:00
Colin Snover
b4dbd6d3c2 MT32: Update Munt to 2.0.0
This changeset also removes unnecessary direct modifications to
Munt code to ease future updates. To update Munt in the future:

1. Replace all source files in the `softsynth/mt32` directory with
   new files from the upstream `mt32emu/src` directory;
2. Update `config.h` with the correct version number for the new
   version of Munt;
3. Update `module.mk` to match the list of sources given in
   `mt32emu/CMakeLists.txt libmt32emu_SOURCES`.
2016-11-25 12:14:13 -06:00
Thierry Crozat
0908fd2225 MT32: Use OSDMessageQueue to post OSD messages from the MT32 thread 2016-10-29 15:13:32 +01:00
Eugene Sandulenko
355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
jepael
5cc2696deb AUDIO: Fix CMS chips incorrect pitch.
The CMS emulation assumes the chips run at 8 MHz clock,
but in PCs they run at 7.15909 MHz, so the emulated pitch
is too high. Adjusting the requested sampling rate higher
by matching amount the pitch is lowered down to normal.
2016-09-07 23:22:18 +03:00