.travis.yml: fix environment
[vamp-aubio-plugins.git] / plugins / Silence.cpp
index c76b220..c1d7f99 100644 (file)
@@ -6,11 +6,21 @@
     Centre for Digital Music, Queen Mary, University of London.
     This file copyright 2006-2008 Chris Cannam and QMUL.
     
-    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.  See the file
-    COPYING included with this distribution for more information.
+    This file is part of vamp-aubio-plugins.
+
+    vamp-aubio 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 3 of the License, or
+    (at your option) any later version.
+
+    vamp-aubio 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 aubio.  If not, see <http://www.gnu.org/licenses/>.
+
 */
 
 #include <math.h>
@@ -117,6 +127,7 @@ Silence::getParameterDescriptors() const
     desc = ParameterDescriptor();
     desc.identifier = "silencethreshold";
     desc.name = "Silence Threshold";
+    desc.description = "Threshold for silence detection";
     desc.minValue = -120;
     desc.maxValue = 0;
     desc.defaultValue = -80;
@@ -196,7 +207,7 @@ Silence::process(const float *const *inputBuffers,
                  Vamp::RealTime timestamp)
 {
     for (size_t i = 0; i < m_stepSize; ++i) {
-        fvec_write_sample(m_ibuf, inputBuffers[0][i], i);
+        fvec_set_sample(m_ibuf, inputBuffers[0][i], i);
     }
 
     bool silent = aubio_silence_detection(m_ibuf, m_threshold);