summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/strip_silence.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-04-29 17:05:42 +0000
committerCarl Hetherington <carl@carlh.net>2009-04-29 17:05:42 +0000
commit9e776feac62e7a9609a29fa233f21d5278475a9d (patch)
tree388f298b35807462380f2115acd289e67a5e0f70 /libs/ardour/ardour/strip_silence.h
parent459c43951238fd771231f840733468b84079dcdc (diff)
Add files missing from previous commit.
git-svn-id: svn://localhost/ardour2/branches/3.0@5011 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/strip_silence.h')
-rw-r--r--libs/ardour/ardour/strip_silence.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/libs/ardour/ardour/strip_silence.h b/libs/ardour/ardour/strip_silence.h
new file mode 100644
index 0000000000..dab3ddd3d5
--- /dev/null
+++ b/libs/ardour/ardour/strip_silence.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2009 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "ardour/filter.h"
+
+namespace ARDOUR {
+
+/// A filter to strip silence from regions
+class StripSilence : public Filter {
+
+public:
+ StripSilence (Session &, double, nframes_t, nframes_t);
+
+ int run (boost::shared_ptr<ARDOUR::Region>);
+
+private:
+ double _threshold; ///< silence threshold, in dBFS
+ nframes_t _minimum_length; ///< minimum length to be considered silence, in samples
+ nframes_t _fade_length; ///< fade in/out to use on trimmed regions, in samples
+};
+
+}