Mercurial > hg > svcore
diff transform/ModelTransformer.cpp @ 876:47aa3aeb687b tonioni
For outputs with unknown bin count or multiple bins with variable sample rate, create additional output models for bins beyond the first
author | Chris Cannam |
---|---|
date | Wed, 29 Jan 2014 09:31:22 +0000 |
parents | 418cd2064769 |
children | b109b88bfa85 |
line wrap: on
line diff
--- a/transform/ModelTransformer.cpp Tue Jan 28 18:52:22 2014 +0000 +++ b/transform/ModelTransformer.cpp Wed Jan 29 09:31:22 2014 +0000 @@ -36,9 +36,19 @@ m_abandoned = true; wait(); if (!m_detached) { - foreach (Model *m, m_outputs) { + Models mine = getOutputModels(); // including any additional ones + foreach (Model *m, mine) { delete m; } } } +ModelTransformer::Models +ModelTransformer::getOutputModels() +{ + Models out(m_outputs); + Models add(getAdditionalOutputModels()); + foreach (Model *m, add) out.push_back(m); + return out; +} +