[Scummvm-git-logs] scummvm master -> addbdc13c5d624ec5349251b8f6d6c580db3108b
lephilousophe
noreply at scummvm.org
Sun Feb 25 09:16:13 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
addbdc13c5 AUDIO: Fix problem where fluidsynth soundfont could not be loaded
Commit: addbdc13c5d624ec5349251b8f6d6c580db3108b
https://github.com/scummvm/scummvm/commit/addbdc13c5d624ec5349251b8f6d6c580db3108b
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2024-02-25T10:16:09+01:00
Commit Message:
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:
cac06647571a3352cb108faad48af9271a69ce36
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.
Changed paths:
audio/softsynth/fluidsynth.cpp
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index e4bf297fa8d..72b20786fc0 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -285,11 +285,11 @@ Common::Path MidiDriver_FluidSynth::getSoundFontPath() const {
if (path.empty())
return path;
- // First check if this is a full path
- Common::Path fullPath(g_system->getFilesystemFactory()->getSystemFullPath(path.toString(Common::Path::kNativeSeparator)), Common::Path::kNativeSeparator);
- Common::FSNode fileNode(fullPath);
- if (fileNode.exists())
- return fullPath;
+ Common::FSNode fileNode(path);
+ if (fileNode.exists()) {
+ // Return the full system path to the soundfont
+ return Common::Path(g_system->getFilesystemFactory()->getSystemFullPath(path.toString(Common::Path::kNativeSeparator)), Common::Path::kNativeSeparator);
+ }
// Then check with soundfontpath
if (ConfMan.hasKey("soundfontpath")) {
More information about the Scummvm-git-logs
mailing list