-TrackOutput used by Jack for process()

This commit is contained in:
Harry van Haaren 2013-07-28 13:14:25 +01:00
parent f34e43b18a
commit 4591cdfb18
3 changed files with 16 additions and 5 deletions

View file

@ -65,6 +65,8 @@ Jack::Jack()
for( int i = 0; i < NTRACKS; i++)
{
trackOutputs.push_back( new TrackOutput(i, loopers.at(i) ) );
dbMeters.push_back( DBMeter( buffers.samplerate ) );
}
@ -138,9 +140,9 @@ int Jack::process (jack_nframes_t nframes)
masterMidiInputIndex++;
}
// process each track
/// process each track, starting at output and working up signal path
for(uint i = 0; i < loopers.size(); i++)
loopers.at(i)->process( nframes, &buffers );
trackOutputs.at(i)->process( nframes, &buffers );
// get DB readings, and send to UI

View file

@ -19,6 +19,7 @@
#include "config.hxx"
#include "looper.hxx"
#include "trackoutput.hxx"
#include "metronome.hxx"
#include "timemanager.hxx"
@ -65,6 +66,9 @@ class Jack
ControllerUpdater controllerUpdater;
vector<Looper*> loopers;
vector<TrackOutput*> trackOutputs;
vector<DBMeter> dbMeters;
// UI update variables

View file

@ -2,19 +2,24 @@
#ifndef LUPPP_TRACK_OUTPUT_H
#define LUPPP_TRACK_OUTPUT_H
class TrackOutput
#include "audioprocessor.hxx"
class TrackOutput : public AudioProcessor
{
public:
TrackOutput(int t, AudioProcessor* ap) :
track(t),
previousInChain(ap),
previousInChain(ap)
{
}
/// copies the track output to master buffer, sidechain & post-side buffer
void process(int nframes, Buffers* buffers)
{
ap->process( nframes, buffers );
if ( previousInChain )
{
previousInChain->process( nframes, buffers );
}
for(int i = 0; i < nframes; i++)
{