const SessionDirectory& session_directory () const { return *(_session_dir.get()); }
- std::string sound_dir (bool with_path = true) const;
std::string peak_dir () const;
std::string automation_dir () const;
}
}
-string
-Session::old_sound_dir (bool with_path) const
-{
- string res;
-
- if (with_path) {
- res = _path;
- }
-
- res += old_sound_dir_name;
-
- return res;
-}
-
-string
-Session::sound_dir (bool with_path) const
-{
- string res;
- string full;
-
- if (with_path) {
- res = _path;
- } else {
- full = _path;
- }
-
- res += interchange_dir_name;
- res += '/';
- res += legalize_for_path (_name);
- res += '/';
- res += sound_dir_name;
-
- if (with_path) {
- full = res;
- } else {
- full += res;
- }
-
- /* if this already exists, don't check for the old session sound directory */
-
- if (Glib::file_test (full, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
- return res;
- }
-
- /* possibly support old session structure */
-
- string old_nopath;
- string old_withpath;
-
- old_nopath += old_sound_dir_name;
- old_nopath += '/';
-
- old_withpath = _path;
- old_withpath += old_sound_dir_name;
-
- if (Glib::file_test (old_withpath.c_str(), Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
- if (with_path)
- return old_withpath;
-
- return old_nopath;
- }
-
- /* ok, old "sounds" directory isn't there, return the new path */
-
- return res;
-}
-
string
Session::peak_dir () const
{