View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004750 | ardour | bugs | public | 2012-02-28 19:47 | 2015-09-18 15:14 |
| Reporter | colinf | Assigned To | cth103 | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0004750: [PATCH] Stem export of 4-channel tracks crashes when normalising. | ||||
| Description | Exporting a track with four channels (or, very likely, any number of channels that is not a factor of 4086), causes A3 to crash: glibmm-ERROR **: unhandled exception (type std::exception) in signal handler: what: Exception thrown by AudioGrapher::ProcessContext<float>: Number of frames given to AudioGrapher::ProcessContext<float> was not a multiple of channels: 4086 frames with \u0004 channels | ||||
| Additional Information | 4086 seems to come from ExportGraphBuilder::Normalizer::Normalizer (), line 296 or so. There's a comment there that says "// TODO good chunk size". Attached the simple patch to change that number to ensure it's an exact multiple of the number of channels in the output file, whilst never exceeding 4086. I've left the "TODO" comment there, since I don't know what the basis for choosing 4086 was in the first place. | ||||
| Tags | No tags attached. | ||||
|
2012-02-28 19:47
|
export-multi-channel-normalise.patch (1,369 bytes)
Index: libs/ardour/export_graph_builder.cc
===================================================================
--- libs/ardour/export_graph_builder.cc (revision 11545)
+++ libs/ardour/export_graph_builder.cc (working copy)
@@ -293,9 +293,10 @@
: parent (parent)
{
config = new_config;
- max_frames_out = 4086; // TODO good chunk size
-
- buffer.reset (new AllocatingProcessContext<Sample> (max_frames_out, config.channel_config->get_n_chans()));
+ unsigned channels = config.channel_config->get_n_chans();
+ max_frames_out = 4086 - (4086 % channels); // TODO good chunk size
+
+ buffer.reset (new AllocatingProcessContext<Sample> (max_frames_out, channels));
peak_reader.reset (new PeakReader ());
normalizer.reset (new AudioGrapher::Normalizer (config.format->normalize_target()));
threader.reset (new Threader<Sample> (parent.thread_pool));
@@ -304,7 +305,7 @@
normalizer->add_output (threader);
int format = ExportFormatBase::F_RAW | ExportFormatBase::SF_Float;
- tmp_file.reset (new TmpFile<float> (format, config.channel_config->get_n_chans(),
+ tmp_file.reset (new TmpFile<float> (format, channels,
config.format->sample_rate()));
tmp_file->FileWritten.connect_same_thread (post_processing_connection,
boost::bind (&Normalizer::start_post_processing, this));
|
|
|
Applied to SVN 11571. Thanks! |
|
|
Closing old issues reported by me: these have long since been fixed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-02-28 19:47 | colinf | New Issue | |
| 2012-02-28 19:47 | colinf | File Added: export-multi-channel-normalise.patch | |
| 2012-03-01 15:42 | cth103 | cost | => 0.00 |
| 2012-03-01 15:42 | cth103 | Note Added: 0012838 | |
| 2012-03-01 15:42 | cth103 | Status | new => resolved |
| 2012-03-01 15:42 | cth103 | Resolution | open => fixed |
| 2012-03-01 15:42 | cth103 | Assigned To | => cth103 |
| 2015-09-18 15:14 | colinf | Note Added: 0017252 | |
| 2015-09-18 15:14 | colinf | Status | resolved => closed |