Essentia  2.1-beta6-dev
ringbufferoutput.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
3  *
4  * This file is part of Essentia
5  *
6  * Essentia is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License as published by the Free
8  * Software Foundation (FSF), either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the Affero GNU General Public License
17  * version 3 along with this program. If not, see http://www.gnu.org/licenses/
18  */
19 
20 #ifndef ESSENTIA_STREAMING_RINGBUFFEROUTPUT_H
21 #define ESSENTIA_STREAMING_RINGBUFFEROUTPUT_H
22 
23 #include "../streamingalgorithm.h"
24 
25 namespace essentia {
26 namespace streaming {
27 
28 class RingBufferOutput : public Algorithm {
29  protected:
32 
33  public:
36 
37  int get(Real* outputData, int max);
38 
40 
42  declareParameter("bufferSize", "the size of the ringbuffer", "", 8192);
43  }
44 
45  void configure();
46  void reset();
47 
48  static const char* name;
49  static const char* category;
50  static const char* description;
51 
52 };
53 
54 } // namespace streaming
55 } // namespace essentia
56 
57 #endif // ESSENTIA_STREAMING_RINGBUFFEROUTPUT_H
void declareParameter(const std::string &name, const std::string &desc, const std::string &range, const Parameter &defaultValue)
Definition: streamingalgorithm.h:140
Definition: ringbufferimpl.h:107
Definition: ringbufferoutput.h:28
static const char * category
Definition: ringbufferoutput.h:49
Sink< Real > _input
Definition: ringbufferoutput.h:30
int get(Real *outputData, int max)
class RingBufferImpl * _impl
Definition: ringbufferoutput.h:31
static const char * description
Definition: ringbufferoutput.h:50
static const char * name
Definition: ringbufferoutput.h:48
void declareParameters()
Definition: ringbufferoutput.h:41
AlgorithmStatus
Definition: streamingalgorithm.h:106
Definition: algorithm.h:28
float Real
Definition: types.h:69