--- linuxsampler/trunk/src/db/InstrumentsDb.cpp 2007/10/01 13:38:37 1364 +++ linuxsampler/trunk/src/db/InstrumentsDb.cpp 2008/01/13 16:36:14 1642 @@ -20,7 +20,7 @@ #include "InstrumentsDb.h" -#if HAVE_SQLITE3 +#include "../common/global_private.h" #include #include @@ -128,6 +128,10 @@ if ( db != NULL) return db; if (DbFile.empty()) DbFile = CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION; + #if defined(__APPLE__) /* 20071224 Toshi Nagata */ + if (DbFile.find("~") == 0) + DbFile.replace(0, 1, getenv("HOME")); + #endif int rc = sqlite3_open(DbFile.c_str(), &db); if (rc) { sqlite3_close(db); @@ -1168,6 +1172,7 @@ try { riff = new RIFF::File(File); gig::File* gig = new gig::File(riff); + gig->SetAutoLoad(false); // avoid time consuming samples scanning std::stringstream sql; sql << "INSERT INTO instruments (dir_id,instr_name,instr_file,"; @@ -1755,5 +1760,3 @@ } } // namespace LinuxSampler - -#endif // HAVE_SQLITE3