summaryrefslogtreecommitdiff
path: root/gtk2_ardour/strip_silence_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-09-19 23:33:35 +0200
committerRobin Gareus <robin@gareus.org>2015-09-19 23:33:35 +0200
commit21c1d0f8323b27cb664165cb22f1828a8aad5c23 (patch)
tree8262e880d819e994702c04edbfa81bcbd5b8d53f /gtk2_ardour/strip_silence_dialog.cc
parenta6caf6ed3a179bb6e9c27582a879953d29ae85fe (diff)
Silence detect: constrain duration in GUI.
Diffstat (limited to 'gtk2_ardour/strip_silence_dialog.cc')
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 7118d1c550..7d07a0ba3b 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -275,13 +275,13 @@ StripSilenceDialog::threshold_changed ()
framecnt_t
StripSilenceDialog::minimum_length () const
{
- return _minimum_length->current_duration (views.front().view->region()->position());
+ return std::max((framecnt_t)1, _minimum_length->current_duration (views.front().view->region()->position()));
}
framecnt_t
StripSilenceDialog::fade_length () const
{
- return _fade_length->current_duration (views.front().view->region()->position());
+ return std::max((framecnt_t)0, _fade_length->current_duration (views.front().view->region()->position()));
}
void