ofxPDSP
ExternalInput.h
1 
2 // ExternalInput.h
3 // ofxPDSP
4 // Nicola Pisanti, MIT License, 2016
5 
6 #ifndef PDSP_CORE_EXTERNALINPUT_H_INCLUDED
7 #define PDSP_CORE_EXTERNALINPUT_H_INCLUDED
8 
9 #include "BasicNodes.h"
10 #include "PatchNode.h"
11 
12 
13 namespace pdsp{
14 
21 class ExternalInput : public Unit {
22 
23 public:
24  ExternalInput();
25  ExternalInput(const ExternalInput & other);
26  ~ExternalInput();
27 
33  void copyInput(float* input, const int & bufferSize) noexcept;
34 
42  void copyInterleavedInput(float* input, int index, int channels, const int & bufferSize) noexcept;
43 
48 
49 private:
50  void process(int bufferSize) noexcept override;
51  void prepareUnit( int expectedBufferSize, double sampleRate ) override;
52  void releaseResources() override;
53 
54  float* buffer;
55  PatchOutputNode output;
56  bool inputUpdated;
57 
58 };
59 
60 
61 
62 }//END NAMESPACE
63 
64 
65 #endif // PDSP_CORE_EXTERNALINPUT_H_INCLUDED
void copyInput(float *input, const int &bufferSize) noexcept
copies input from a non-interleaved array
Definition: ExternalInput.cpp:33
void copyInterleavedInput(float *input, int index, int channels, const int &bufferSize) noexcept
copies input from a interleaved array
Definition: ExternalInput.cpp:41
Abstract class for implementing Units.
Definition: BasicNodes.h:223
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
Unit to copy values from an external audio input and convert them to a patchable output.
Definition: ExternalInput.h:21
Patchable & out_signal()
Sets "signal" as selected output and return this Unit ready to be patched. This is the default output...
Definition: ExternalInput.cpp:28