Fix export silence threshold by using a constant value for now

All float values defined in the CONFIG_VARIABLE macro seem like they are cast
to at some stage before writing (another issue that needs addressing). The
default value for export-silence-threshold (-INFINITY) is converted to a value
of 0 and as a result nothing is exported with trim enabled.

Use the same fixed silence threshold as Mixbus until proper bounds checking and
GUI is in place.

Related: #6412
This commit is contained in:
Tim Mayberry 2016-12-04 23:17:20 +10:00
parent 9e794af3ea
commit 6784923a05

View file

@ -641,12 +641,9 @@ ExportGraphBuilder::SilenceHandler::SilenceHandler (ExportGraphBuilder & parent,
max_frames_in = max_frames;
framecnt_t sample_rate = parent.session.nominal_frame_rate();
#ifdef MIXBUS
silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in, -90));
#else
// TODO silence-threshold should be per export-preset, with Config->get_silence_threshold being the default
silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in, Config->get_export_silence_threshold ()));
#endif
silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in, -90));
silence_trimmer->set_trim_beginning (config.format->trim_beginning());
silence_trimmer->set_trim_end (config.format->trim_end());