summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc8
-rw-r--r--libs/ardour/audioregion.cc3
2 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index daa540d039..3e68f0dd06 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -140,7 +140,7 @@ void
StripSilenceDialog::silences (AudioIntervalMap& m)
{
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- pair<boost::shared_ptr<Region>,AudioIntervalResult> newpair ((*v).view->region(), (*v).intervals);
+ pair<boost::shared_ptr<Region>,AudioIntervalResult> newpair (v->view->region(), v->intervals);
m.insert (newpair);
}
}
@@ -149,7 +149,7 @@ void
StripSilenceDialog::drop_rects ()
{
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- (*v).view->drop_silent_frames ();
+ v->view->drop_silent_frames ();
}
}
@@ -190,7 +190,7 @@ StripSilenceDialog::update_silence_rects ()
double const y = _threshold.get_value();
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- (*v).view->set_silent_frames ((*v).intervals, y);
+ v->view->set_silent_frames (v->intervals, y);
}
}
@@ -215,7 +215,7 @@ StripSilenceDialog::detection_thread_work ()
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> ((*i).view->region());
if (ar) {
- (*i).intervals = ar->find_silence (dB_to_coefficient (threshold ()), minimum_length (), _interthread_info);
+ i->intervals = ar->find_silence (dB_to_coefficient (threshold ()), minimum_length (), _interthread_info);
}
if (_interthread_info.cancel) {
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index cb3e00cea9..fd98c602bb 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -1540,7 +1540,6 @@ AudioRegion::find_silence (Sample threshold, framecnt_t min_length, InterThreadI
bool in_silence = false;
frameoffset_t silence_start = 0;
- bool silence;
while (pos < end && !itt.cancel) {
@@ -1556,7 +1555,7 @@ AudioRegion::find_silence (Sample threshold, framecnt_t min_length, InterThreadI
/* now look for silence */
for (framecnt_t i = 0; i < block_size; ++i) {
- silence = abs (loudest[i]) < threshold;
+ bool const silence = abs (loudest[i]) < threshold;
if (silence && !in_silence) {
/* non-silence to silence */
in_silence = true;