Commit Graph
366 Commits
Author SHA1 Message Date
Filippos Karapetis 404d098e33 AUDIO: Use pointers when deleting inside range loops 2025-03-27 13:47:57 +08:00
Filippos Karapetis 2255fb7d53 AUDIO: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Raffaello Bertini 15425aa66b AUDIO: Fix playback in OPL3 mono mode
If running an OPL2 track on a DOS_BOX OPL3 emulator,
The buffer will be divided by 2 like if it is stereo,
but it will generate a mono audio stream, as opl3Active
flag is disabled, so it will act as an OPL2.
The error results in wrong sound produced.
This fix the issue when OPL3 is used as an OPL2 and therefore
as a mono audio source.

The current error should be easily reproducible if
using OPL3 with .ADL Westwood's files.

This bug it might have never been noticed because those files,
in kyra engine, are using always OPL2 (kAdlib) is used.

When DosBox OPL3 Emulator is run as OPL2 compatibilty mode,
requires to call the GenerateBlock2 method as the internal
stereo mode used in GenerateBlock3 is not activated.

This fix covers all scenarios:
- OPL2: default common base case, non stereo.
- DUAL_OPL2: This is kind of OPL3 mode,
             I don't think is really fully supported,
- OPL3 in OPL2 mode: In this scenario the audio buffer is stereo, but
                     the emulator is generating mono audio.
- OPL3 in OPL3 mode: this is the full stereo mode of OPL3.
2025-01-24 22:40:35 +01:00
Le Philousophe de5b118fe5 AUDIO: MT32: Force MT32 rebuild after configure is run
When configuration flags are changed (ASan enabling for example), force
rebuild the MT32 objects.
They were not rebuild because not depending on config.h
2024-12-29 01:10:52 +01:00
Thierry Crozat ae660505a4 AUDIO: Fix Fluidsynth soundfont path check on iOS
On iOS a sandboxed filesystem is used where the root is in the
Application folder instead of being the filesystem root. As a
result path used in ScummVM (for example for FSNode) are different
from filesystem paths. For fluidsynth the internal soundfont path
is transformed to a filesystem path to pass to the fluidsynth
library. On iOS trying to create a FSNode with that full path does
not work and that caused the soundfont existence check to fail.
2024-12-27 10:16:48 +02:00
Eugene Sandulenko 89febd4230 CONFIGURE: Turned sid_audio into a component 2024-12-26 19:30:48 +01:00
Hubert Maier f54fd81b4f JANITORIAL: Fix typos in general files 2024-12-25 16:57:34 +02:00
elasota ca88c52064 AUDIO: Split MIDI check flags out, fail checkDevice by default for "auto" 2024-11-04 23:00:57 +02:00
elasota 6a03f4ada3 AUDIO: Add checkDevice support for FluidSynth 2024-11-04 23:00:57 +02:00
Cameron Cawley 197ba8cbd5 BACKENDS: Remove leftover GP2X references 2024-09-29 22:48:29 +01:00
Hubert Maier 11ecd6982e JANITORIAL: AUDIO: Fix typos 2024-09-13 12:04:57 +03:00
Torbjörn Andersson 4877a1981d AUDIO: Sync with upstream Nuked OPL. Last commit: cfedb09e 2024-09-09 09:25:43 +03:00
Le Philousophe 867cbfcd0d ANDROID: Create a dedicated define for Android backend
This allows other backends (SDL, libretro) to be used on Android without
hacks.
2024-09-02 20:53:57 +03:00
Cameron Cawley 5f70129eab AUDIO: Remove unused interface for OPL reads 2024-08-11 17:54:01 +03:00
chillywillysoft 3e55f172d8 SOFTSYNTH/PCSPK: fix overflow to allow sounds longer than 97 ms (at 44100 Hz) 2024-08-06 20:20:09 +03:00
Eugene Sandulenko 8d4b8d2c70 AUDIO: Add missing override keyword 2024-07-27 10:15:21 +02:00
Cameron Cawley b5887b2464 AUDIO: Share code between OPL and CMS implementations 2024-07-27 00:54:57 +03:00
Cameron Cawley e3b16b832d AUDIO: Change the EmulatedCMS API to match EmulatedOPL 2024-07-27 00:54:57 +03:00
Filippos Karapetis cd2f52339f AUDIO: Remove leftover reference to common/inttypes.h 2024-07-04 15:18:00 +03:00
Torbjörn Andersson a16f24b9bb AUDIO: Sync with upstreams Nuked OPL. Last commit: 730f8c2 2024-07-04 15:13:11 +03:00
Hubert Maier 0e691e209d JANITORIAL: Fix substract typo in dbopl.cpp 2024-05-18 13:52:31 +02:00
Stephen West e2fe9523e4 MIDI: close files on error 2024-03-31 23:04:56 +03:00
Stephen West 0de5381038 MIDI: clear up debug message 2024-03-31 23:04:56 +03:00
Stephen West 0a5c94a0bc MIDI: load CM32L_*.ROM or MT32_*.ROM as pairs 2024-03-31 23:04:56 +03:00
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
athrxx 03a2bf85b0 AUDIO: (FM-TOWNS) - slightly adjust CD volume control
(Make it logaritmic instead of just linear. This improves the
music volume in Loom when using the distaff)
2024-03-03 15:01:37 +01:00
Lars Sundström addbdc13c5 AUDIO: Fix problem where fluidsynth soundfont could not be loaded
The user can specify a custom soundfont to be used with fluidsynth.
There was previously a hack for the iOS7 backend to get the path to
the document folder where the user can put files in a sandboxed
environment. This hack was removed in commit:
cac0664757

The problem however occurred when creating a FSNode from the full
system path because FSNode uses makeFileNodePath, which already
prepends the root. So the full path is added twice which causes the
fileNode.exists() to fail.

Create the FSNode from the path to the soundfont and check if the
file exist. If so then return the full path.
2024-02-25 10:16:09 +01:00
Eugene Sandulenko 1d6f7b05ea JANITORIAL: Clean up some English language 2024-01-21 00:28:44 +01:00
Cameron Cawley 5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe ce961cabbc COMMON: Make soundfont a Path object 2023-12-24 13:19:25 +01:00
Thierry Crozat cac0664757 AUDIO: Improve code to map the soundfont path to system path on iOS
The code looks a bit less hack-ish and also now supports using path
in the application bundle and not only in the documents folder. It
could also help for other backends using a sandoxed filesystem.
2023-12-03 16:17:32 +00:00
Thierry Crozat f47d915ec0 AUDIO: Support specifying a soundfont in the ConfMan default domain 2023-12-03 16:17:32 +00:00
Thierry Crozat 6fc56a6333 AUDIO: Add lookup of fluidsynth soundfont using SearchMan or a soundfontpath config 2023-12-03 16:17:32 +00:00
Coen Rampen f1abbff901 MIDI: Update FluidSynth settings
This updates the FluidSynth settings to the value ranges and defaults used by
the current version 2.3.4.

Reverb
- Room size: 0.00-1.20 / 0.20 to 0.00-1.00 / 0.20
- Width: 0-100 / 1 to 0.0-100.0 / 0.5
Chorus
- Level: 0.00-1.00 / 1.00 to 0.00 - 10.00 / 2.00
- Speed: 0.30-5.00 / 0.30 to 0.10-5.00 / 0.30
- Depth: 0.0-21.0 / 8.0 to 0.0-256.0 / 8.0
2023-11-25 22:26:53 +01:00
sluicebox 01ab50eae6 AUDIO: FM-TOWNS/PC-98: Fix array init. PVS-Studio V512
The intent was to initialize a two dimensional array but instead only
the first 257 of 510 bytes were initialized.
2023-11-19 20:29:44 -08:00
Le Philousophe 2e68867e98 AUDIO: Remove dynamic load of EAS for Android and fix DLS loading
Android 7 prevents loading of private libraries like AES.
DLS support was also broken because of a change in API.
2023-08-06 14:10:50 +02:00
Cameron Cawley 37764d86fc AUDIO: Support building the EAS MIDI driver on non-Android platforms 2023-08-06 14:10:50 +02:00
Misty De Meo ea8ee0291c AUDIO: remove unused variable assignment in dbopl 2023-06-17 10:12:30 -07:00
Thierry Crozat a0e32ee370 IOS7: Remove support for non-sandboxed mode 2023-04-26 22:31:31 +01:00
Eugene Sandulenko 7e7683db44 AUDIO: MT32: sprintf -> snprintf 2023-03-17 16:58:44 +01:00
Eugene Sandulenko 511a77f643 AUDIO: Avoid including translations.h in header file 2023-03-17 14:37:50 +01:00
Le Philousophe a725253a18 ANDROID: Make sure EAS driver is open before using its functions
This prevents crashes when the library cannot be found
2023-02-15 08:21:04 +01:00
Le Philousophe e2357fc35c ANDROID: Allow to load soundfont through SAF 2023-02-15 08:21:04 +01:00
Le Philousophe ab5718055b AUDIO: Add in-memory soundfont support for FluidLite 2023-02-15 08:21:04 +01:00
Cameron Cawley 5870b7d599 AUDIO: Reduce the static table sizes in the SID emulator 2022-12-22 23:46:52 +01:00
Cameron Cawley 6cf3487803 AUDIO: Merge the DOSBoxCMS and CMSEmulator classes 2022-12-01 00:28:56 +02:00
Cameron Cawley 8c40151285 AUDIO: Use fixed-point arithmetic in the CMS emulator 2022-11-29 00:14:00 +01:00
Cameron Cawley 29923889d9 AUDIO: Backport commit r4010 from DOSBox to the CMS emulator
Correct oscillator frequency used in the gameblaster. Thanks OPLx, Great Hierophant and NewRisingSun. Reported on VOGONS: 38350.
2022-11-26 23:06:21 +02:00
Cameron Cawley 99485ac757 AUDIO: Backport commit r3523 from DOSBox to the CMS emulator
CMS/Gameblaster: add sbtype=gb, fix base addresses other than 220h, fix lack of sound when starting from autoexec, add autodetection (Thanks robertmo and Cloudschatze)
2022-11-26 23:06:21 +02:00
Hubert Maier abcf7ba960 JANITORIAL: AUDIO: Correct Spelling Mistakes
occured -> occurred
occassionally -> occasionally
rythm -> rhythm
2022-11-15 22:52:43 +02:00