summaryrefslogtreecommitdiff
path: root/libs/ardour/export_graph_builder.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-16 14:25:49 +0100
committerRobin Gareus <robin@gareus.org>2016-02-16 14:25:49 +0100
commita664fb703e2cc30196231f2614178e834fe804ba (patch)
tree840b6a52775834ac0ff29630500fba3721a5f841 /libs/ardour/export_graph_builder.cc
parentc52854fd3d8fd7316534cafc2d3e125044d0dc83 (diff)
chunk data before analysis, prefer 8K
* consistent spectrum display for all reports (same binsize) * improved performance (power of two)
Diffstat (limited to 'libs/ardour/export_graph_builder.cc')
-rw-r--r--libs/ardour/export_graph_builder.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc
index 9e25d51513..58eecff899 100644
--- a/libs/ardour/export_graph_builder.cc
+++ b/libs/ardour/export_graph_builder.cc
@@ -311,8 +311,11 @@ ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &parent, FileSpec const & new_c
framecnt_t sb = config.format->silence_beginning_at (parent.timespan->get_start(), sample_rate);
framecnt_t se = config.format->silence_end_at (parent.timespan->get_end(), sample_rate);
framecnt_t duration = parent.timespan->get_length () + sb + se;
+ max_frames = min ((framecnt_t) 8192 * channels, max ((framecnt_t) 4096 * channels, max_frames));
+ chunker.reset (new Chunker<Sample> (max_frames));
analyser.reset (new Analyser (config.format->sample_rate(), channels, max_frames,
(framecnt_t) ceil (duration * config.format->sample_rate () / sample_rate)));
+ chunker->add_output (analyser);
parent.add_analyser (config.filename->get_path (config.format), analyser);
}
@@ -348,7 +351,7 @@ ExportGraphBuilder::FloatSinkPtr
ExportGraphBuilder::SFC::sink ()
{
if (_analyse) {
- return analyser;
+ return chunker;
} else if (data_width == 8 || data_width == 16) {
return short_converter;
} else if (data_width == 24 || data_width == 32) {