DspBaseModule.h
Go to the documentation of this file.
1 /*
2 * This file is part of HISE.
3 * Copyright 2016 Christoph Hart
4 *
5 * HISE is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * HISE is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with HISE. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Commercial licenses for using HISE in an closed source project are
19 * available on request. Please visit the project's website to get more
20 * information about commercial licencing:
21 *
22 * http://www.hartinstruments.net/hise/
23 *
24 * HISE is based on the JUCE library,
25 * which also must be licenced for commercial applications:
26 *
27 * http://www.juce.com
28 */
29 
30 #ifndef DSPBASEMODULE_H_INCLUDED
31 #define DSPBASEMODULE_H_INCLUDED
32 
33 
34 
42 enum class LoadingErrorCode
43 {
44  LoadingSuccessful = 0,
49  KeyInvalid,
50  numErrorCodes
51 };
52 
53 
129 {
130 public:
131 
132  // ================================================================================================================
133 
134  DspBaseObject();
135  virtual ~DspBaseObject();
136 
137  // ================================================================================================================
138 
150  virtual void prepareToPlay(double sampleRate, int blockSize) = 0;
151 
158  virtual void processBlock(float **data, int numChannels, int numSamples) = 0;
159 
160  // =================================================================================================================
161 
163  virtual int getNumParameters() const = 0;
164 
166  virtual float getParameter(int index) const = 0;
167 
169  virtual void setParameter(int index, float newValue) = 0;
170 
172  virtual const char* getStringParameter(int index, size_t& textLength);
173 
179  virtual void setStringParameter(int index, const char* text, size_t textLength);
180 
181  // =================================================================================================================
182 
184  virtual int getNumConstants() const;;
185 
194  virtual void getIdForConstant(int index, char* name, int &size) const noexcept;
195 
203  virtual bool getConstant(int index, float& value) const noexcept;
204 
216  virtual bool getConstant(int index, int& value) const noexcept;
217 
225  virtual bool getConstant(int index, char* text, size_t& size) const noexcept;
226 
236  virtual bool getConstant(int index, float** data, int &size) noexcept;
237 
238  // =================================================================================================================
239 
240  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DspBaseObject)
241 };
242 
243 
244 #endif // DSPBASEMODULE_H_INCLUDED
virtual bool getConstant(int index, float &value) const noexcept
The version does not match. This error code will be never thrown automatically, but it is there to co...
virtual void processBlock(float **data, int numChannels, int numSamples)=0
virtual void setParameter(int index, float newValue)=0
LoadingErrorCode
Definition: DspBaseModule.h:42
virtual float getParameter(int index) const =0
The licence key that was passed to the initialise() method didn't match the one of the library...
the library could not be found in the library folder.
virtual void prepareToPlay(double sampleRate, int blockSize)=0
virtual const char * getStringParameter(int index, size_t &textLength)
something went wrong during initialisation
virtual int getNumConstants() const
virtual int getNumParameters() const =0
The library seems to be missing a initialise() method with the correct signature. ...
virtual void setStringParameter(int index, const char *text, size_t textLength)
Definition: DspBaseModule.h:128
virtual void getIdForConstant(int index, char *name, int &size) const noexcept

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.