VISR  0.11.6
Versatile Interactive Scene Renderer
gain_matrix.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
3 #ifndef VISR_MAXMSP_GAIN_MATRIX_GAIN_MATRIX_HPP_INCLUDED
4 #define VISR_MAXMSP_GAIN_MATRIX_GAIN_MATRIX_HPP_INCLUDED
5 
8 
10 
11 #include <librcl/gain_matrix.hpp>
12 
13 // We have to include these files last because they pull in the Max/MSP headers which do some very nasty
14 // stuff such as defining macros min, max, and error
17 
18 #include <cstddef>
19 #include <memory>
20 
21 namespace visr
22 {
23 
24 namespace maxmsp
25 {
26 
28 {
29 public:
30 
31  explicit GainMatrix( t_pxobject & maxProxy, short argc, t_atom *argv );
32 
33  ~GainMatrix();
34 
35  /*virtual*/ void initDsp( t_object *dsp64, short *count, double samplerate, long maxvectorsize, long flags);
36 
37  /*virtual*/ void perform( t_object *dsp64, double **ins,
38  long numins, double **outs, long numouts,
39  long sampleframes, long flags, void *userparam);
40 
41  /*virtual*/ void assist( void *b, long msg, long arg, char *dst );
42 
43 
44  /*virtual*/ void getFloat( double f );
45 
46 private:
51  std::size_t mPeriod;
52  std::size_t mNumberOfInputs;
53  std::size_t mNumberOfOutputs;
54  std::size_t mInterpolationSteps;
55 
60  std::unique_ptr<SignalFlowContext> mContext;
61 
62  std::unique_ptr<rcl::GainMatrix> mFlow;
63  std::unique_ptr<maxmsp::SignalFlowWrapper<double> > mFlowWrapper;
64 
66 };
67 
68 } // namespace maxmsp
69 } // namespace visr
70 
71 #endif // #ifndef VISR_MAXMSP_GAIN_MATRIX_GAIN_MATRIX_HPP_INCLUDED
void perform(t_object *dsp64, double **ins, long numins, double **outs, long numouts, long sampleframes, long flags, void *userparam)
Definition: gain_matrix.cpp:190
~GainMatrix()
Definition: gain_matrix.cpp:131
void getFloat(double f)
Definition: gain_matrix.cpp:135
Definition: options.cpp:10
void initDsp(t_object *dsp64, short *count, double samplerate, long maxvectorsize, long flags)
Definition: gain_matrix.cpp:162
Definition: gain_matrix.hpp:27
void assist(void *b, long msg, long arg, char *dst)
Definition: gain_matrix.cpp:217
GainMatrix(t_pxobject &maxProxy, short argc, t_atom *argv)
Definition: gain_matrix.cpp:43
Definition: external_base.hpp:40