make post-export analysis optional (default to enabled)
This commit is contained in:
parent
fd3772a40f
commit
837f8fac2b
|
@ -99,6 +99,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
|
|||
void set_with_mp4chaps (bool yn) { _with_mp4chaps = yn; }
|
||||
void set_soundcloud_upload (bool yn) { _soundcloud_upload = yn; }
|
||||
void set_command (std::string command) { _command = command; }
|
||||
void set_analyse (bool yn) { _analyse = yn; }
|
||||
|
||||
void set_silence_beginning (AnyTime const & value) { _silence_beginning = value; }
|
||||
void set_silence_end (AnyTime const & value) { _silence_end = value; }
|
||||
|
@ -163,6 +164,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
|
|||
|
||||
bool soundcloud_upload() const { return _soundcloud_upload; }
|
||||
std::string command() const { return _command; }
|
||||
bool analyse() const { return _analyse; }
|
||||
|
||||
bool tag () const { return _tag && supports_tagging; }
|
||||
|
||||
|
@ -214,7 +216,9 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
|
|||
bool _with_cue;
|
||||
bool _with_mp4chaps;
|
||||
bool _soundcloud_upload;
|
||||
std::string _command;
|
||||
|
||||
std::string _command;
|
||||
bool _analyse;
|
||||
|
||||
/* serialization helpers */
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ class LIBARDOUR_API ExportGraphBuilder
|
|||
int data_width;
|
||||
|
||||
AnalysisPtr analyser;
|
||||
bool _analyse;
|
||||
// Only one of these should be available at a time
|
||||
FloatConverterPtr float_converter;
|
||||
IntConverterPtr int_converter;
|
||||
|
|
|
@ -173,6 +173,7 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s)
|
|||
, _with_mp4chaps (false)
|
||||
, _soundcloud_upload (false)
|
||||
, _command ("")
|
||||
, _analyse (true)
|
||||
{
|
||||
format_ids.insert (F_None);
|
||||
endiannesses.insert (E_FileDefault);
|
||||
|
@ -186,6 +187,7 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const
|
|||
, _silence_beginning (s)
|
||||
, _silence_end (s)
|
||||
, _soundcloud_upload (false)
|
||||
, _analyse (true)
|
||||
{
|
||||
_silence_beginning.type = Time::Timecode;
|
||||
_silence_end.type = Time::Timecode;
|
||||
|
@ -199,6 +201,7 @@ ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification
|
|||
, _silence_beginning (other.session)
|
||||
, _silence_end (other.session)
|
||||
, _soundcloud_upload (false)
|
||||
, _analyse (other._analyse)
|
||||
{
|
||||
if (modify_name) {
|
||||
set_name (other.name() + " (copy)");
|
||||
|
|
|
@ -307,7 +307,10 @@ ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &parent, FileSpec const & new_c
|
|||
unsigned channels = new_config.channel_config->get_n_chans();
|
||||
analyser.reset (new Analyser (config.format->sample_rate(), channels, max_frames,
|
||||
(framecnt_t) ceil (parent.timespan->get_length () * config.format->sample_rate () / (double) parent.session.nominal_frame_rate ())));
|
||||
parent.add_analyser (config.filename->get_path (config.format), analyser);
|
||||
_analyse = config.format->analyse();
|
||||
if (_analyse) {
|
||||
parent.add_analyser (config.filename->get_path (config.format), analyser);
|
||||
}
|
||||
|
||||
if (data_width == 8 || data_width == 16) {
|
||||
short_converter = ShortConverterPtr (new SampleFormatConverter<short> (channels));
|
||||
|
@ -331,7 +334,15 @@ ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &parent, FileSpec const & new_c
|
|||
ExportGraphBuilder::FloatSinkPtr
|
||||
ExportGraphBuilder::SFC::sink ()
|
||||
{
|
||||
return analyser;
|
||||
if (_analyse) {
|
||||
return analyser;
|
||||
} else if (data_width == 8 || data_width == 16) {
|
||||
return short_converter;
|
||||
} else if (data_width == 24 || data_width == 32) {
|
||||
return int_converter;
|
||||
} else {
|
||||
return float_converter;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user