13
0

API change: expose session-archive compression-level

This commit is contained in:
Robin Gareus 2017-10-03 01:56:17 +02:00
parent 7613c9cb34
commit 0802a0872f
2 changed files with 8 additions and 2 deletions

View File

@ -42,6 +42,7 @@
#include "pbd/error.h" #include "pbd/error.h"
#include "pbd/event_loop.h" #include "pbd/event_loop.h"
#include "pbd/file_archive.h"
#include "pbd/rcu.h" #include "pbd/rcu.h"
#include "pbd/reallocpool.h" #include "pbd/reallocpool.h"
#include "pbd/statefuldestructible.h" #include "pbd/statefuldestructible.h"
@ -523,7 +524,11 @@ public:
FLAC_24BIT FLAC_24BIT
}; };
int archive_session (const std::string&, const std::string&, ArchiveEncode compress_audio = FLAC_16BIT, bool only_used_sources = false, Progress* p = 0); int archive_session (const std::string&, const std::string&,
ArchiveEncode compress_audio = FLAC_16BIT,
PBD::FileArchive::CompressionLevel compression_level = PBD::FileArchive::CompressGood,
bool only_used_sources = false,
Progress* p = 0);
int restore_state (std::string snapshot_name); int restore_state (std::string snapshot_name);
int save_template (const std::string& template_name, const std::string& description = "", bool replace_existing = false); int save_template (const std::string& template_name, const std::string& description = "", bool replace_existing = false);

View File

@ -5217,6 +5217,7 @@ int
Session::archive_session (const std::string& dest, Session::archive_session (const std::string& dest,
const std::string& name, const std::string& name,
ArchiveEncode compress_audio, ArchiveEncode compress_audio,
FileArchive::CompressionLevel compression_level,
bool only_used_sources, bool only_used_sources,
Progress* progress) Progress* progress)
{ {
@ -5539,7 +5540,7 @@ Session::archive_session (const std::string& dest,
i->first->set_gain (i->second, true); i->first->set_gain (i->second, true);
} }
int rv = ar.create (filemap, PBD::FileArchive::CompressGood); int rv = ar.create (filemap, compression_level);
remove_directory (to_dir); remove_directory (to_dir);
return rv; return rv;