X-Git-Url: https://git.aubio.org/?p=vamp-aubio-plugins.git;a=blobdiff_plain;f=plugins%2FSilence.cpp;h=c1d7f99db7589a73e08b398082327371976e129f;hp=c76b2204cc18cd26d6ca26fcd2db17b66b8f155e;hb=11663a4e47dc39a68d621c7823c645aa766d927e;hpb=261f952863eb0dfe3271ba4079406fe391bd4f67 diff --git a/plugins/Silence.cpp b/plugins/Silence.cpp index c76b220..c1d7f99 100644 --- a/plugins/Silence.cpp +++ b/plugins/Silence.cpp @@ -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 . + */ #include @@ -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);