BSoftSynth: Also look for softsynth in B_SYSTEM_SETTINGS_DIRECTORY and B_SYNTH_DIRECTORY.

Note that this will probably we changed again as we introduce a setting file
to locate the softsynth.
This commit is contained in:
Stefano Ceccherini
2014-09-23 06:31:57 +02:00
parent 3b7e5b40d0
commit d3c865ecd8
+14 -2
View File
@@ -25,7 +25,7 @@
using namespace BPrivate;
const static char* kSynthFileName = "synth.sf2";
const static char* kSynthFileName = "synth/synth.sf2";
struct ReverbSettings {
double room, damp, width, level;
@@ -105,7 +105,19 @@ BSoftSynth::SetDefaultInstrumentsFile()
// in the user settings directory
BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, false, NULL) == B_OK) {
path.Append("/synth/");
path.Append(kSynthFileName);
if (BEntry(path.Path()).Exists())
return SetInstrumentsFile(path.Path());
}
// Then in the system settings directory
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, false, NULL) == B_OK) {
path.Append(kSynthFileName);
if (BEntry(path.Path()).Exists())
return SetInstrumentsFile(path.Path());
}
if (find_directory(B_SYNTH_DIRECTORY, &path, false, NULL) == B_OK) {
path.Append(kSynthFileName);
if (BEntry(path.Path()).Exists())
return SetInstrumentsFile(path.Path());