summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-07 01:03:46 +0100
committerRobin Gareus <robin@gareus.org>2016-12-07 01:03:46 +0100
commitb14ece32c2b7570c1c0d93b9e88de44f6377909c (patch)
treea80beab3e69e9e5ed2b4756674003965eb3ead41
parent230fa064b2f496c9b4e64a4f18c469460f8135c7 (diff)
Work around silence-trim config 0dBFS (7b1f97bf)
-rw-r--r--libs/ardour/export_graph_builder.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc
index 7c5a434bee..8bac5a90f1 100644
--- a/libs/ardour/export_graph_builder.cc
+++ b/libs/ardour/export_graph_builder.cc
@@ -641,8 +641,14 @@ ExportGraphBuilder::SilenceHandler::SilenceHandler (ExportGraphBuilder & parent,
max_frames_in = max_frames;
framecnt_t sample_rate = parent.session.nominal_frame_rate();
+ /* work around partsing "-inf" config to "0" -- 7b1f97b
+ * silence trim 0dBFS makes no sense, anyway.
+ */
+ float est = Config->get_export_silence_threshold ();
+ if (est >= 0.f) est = -INFINITY;
#ifdef MIXBUS
- silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in, -90));
+ // Mixbus channelstrip always dithers the signal, cut above dither level
+ silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in, std::max (-90.f, est)));
#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 ()));