diff --git a/src/audioprocessor.hxx b/src/audioprocessor.hxx new file mode 100644 index 0000000..56a8c85 --- /dev/null +++ b/src/audioprocessor.hxx @@ -0,0 +1,31 @@ + +#ifndef LUPPP_AUDIO_PROCESSOR_H +#define LUPPP_AUDIO_PROCESSOR_H + +class AudioProcessor +{ + public: + AudioProcessor(){} + + /// copies the track output to master buffer, sidechain & post-side buffer + virtual void process(int nframes, Buffers* buffers) + { + + + } + + virtual ~AudioProcessor(){}; + + private: + int track; + + float _toMaster; + + float _toReverb; + float _toSidechain; + float _toPostSidechain; + +}; + +#endif // LUPPP_AUDIO_PROCESSOR_H + diff --git a/src/looper.hxx b/src/looper.hxx index 6dd6481..30c04c0 100644 --- a/src/looper.hxx +++ b/src/looper.hxx @@ -6,6 +6,7 @@ #include #include "buffers.hxx" +#include "audioprocessor.hxx" #include "observer/observer.hxx" #define SAMPLE_SIZE 44100*60 @@ -14,7 +15,7 @@ class AudioBuffer; using namespace std; -class Looper : public Observer // for notifications +class Looper : public AudioProcessor, public Observer // for notifications { public: enum State { diff --git a/src/trackoutput.hxx b/src/trackoutput.hxx new file mode 100644 index 0000000..0b82f19 --- /dev/null +++ b/src/trackoutput.hxx @@ -0,0 +1,40 @@ + +#ifndef LUPPP_TRACK_OUTPUT_H +#define LUPPP_TRACK_OUTPUT_H + +class TrackOutput +{ + public: + TrackOutput(int t, AudioProcessor* ap) : + track(t), + previousInChain(ap), + { + } + + /// copies the track output to master buffer, sidechain & post-side buffer + void process(int nframes, Buffers* buffers) + { + ap->process( nframes, buffers ); + + for(int i = 0; i < nframes; i++) + { + // copy data here + } + } + + private: + int track; + + float _toMaster; + + float _toReverb; + float _toSidechain; + float _toPostSidechain; + + /// Pointer to "previous" processor: the graph is backwards + AudioProcessor* previousInChain; + +}; + +#endif // LUPPP_TRACK_OUTPUT_H +