summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/audioregion.cc9
-rw-r--r--libs/surfaces/mackie/strip.cc1
2 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 4b85819d6e..4c7979dbfc 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -760,8 +760,8 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
*/
if (Config->get_replicate_missing_region_channels()) {
- /* track is N-channel, this region has less channels, so use a relevant channel
- */
+
+ /* copy an existing channel's data in for this non-existant one */
uint32_t channel = n_channels() % chan_n;
boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[channel]);
@@ -769,6 +769,11 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
if (src->read (buf, _start + internal_offset, to_read) != to_read) {
return 0; /* "read nothing" */
}
+
+ } else {
+
+ /* use silence */
+ memset (buf, 0, sizeof (Sample) * to_read);
}
}
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index f71e3520ed..2b4368f4bb 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -70,6 +70,7 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::
, _fader_touch (0)
, _vpot (0)
, _fader (0)
+ , _meter (0)
, _index (index)
, _surface (&s)
, _controls_locked (false)