-Added error checking in Jack, added config #define DEBUG_TRACKS

This commit is contained in:
Harry van Haaren 2013-08-26 16:34:51 +01:00
parent e72fc9dd44
commit 294610e87d
4 changed files with 47 additions and 8 deletions

2
TODO
View file

@ -1,5 +1,7 @@
=== NEW
-Update SIDE control to blue button
-Add track recordArm functionality to record over loaded loops
- Remove TimeObserver obligation from Looper, not needed as GridLogic handles Time now

View file

@ -3,13 +3,16 @@
#define LUPPP_CONFIG_H
/// DEBUG OPTIONS
// Track operations
#define DEBUG_TRACKS 1
// Clip selection / queueing
#define DEBUG_CLIP 1
// Buffer loading / resizing
#define DEBUG_BUFFER 1
/// General Options
#define NTRACKS 8
#define NSCENES 10

View file

@ -144,6 +144,42 @@ void Jack::activate()
}
TrackOutput* Jack::getTrackOutput(int t)
{
if ( t >= 0 && t < NTRACKS )
return trackOutputs.at(t);
#ifdef DEBUG_TRACKS
else
{
printf( "Jack::getTrackOutput() returning 0x0: invalid track requested!\n" );
}
#endif
return 0;
}
Looper* Jack::getLooper(int t)
{
if ( t >= 0 && t < NTRACKS )
return loopers.at(t);
#ifdef DEBUG_TRACKS
else
{
printf( "Jack::getLooper() returning 0x0: invalid track requested!\n" );
}
#endif
return 0;
}
void Jack::registerMidiObserver( MidiObserver* mo )
{
midiObservers.push_back( mo );
}
int Jack::process (jack_nframes_t nframes)
{

View file

@ -38,20 +38,18 @@ class Jack
int getSamplerate();
/// get functions for components owned by Jack
Looper* getLooper(int t) {return loopers.at(t); }
Metronome* getMetronome(){return metronome;}
Looper* getLooper(int t);
TrackOutput* getTrackOutput(int t);
Logic* getLogic(){return logic;}
Metronome* getMetronome(){return metronome;}
GridLogic* getGridLogic(){return gridLogic;}
TrackOutput* getTrackOutput(int t){return trackOutputs.at(t);}
TimeManager* getTimeManager(){return &timeManager;}
ControllerUpdater* getControllerUpdater(){return controllerUpdater;}
/// register MIDI observers: they're called when a MIDI message arrives on
/// a port they're watching
void registerMidiObserver( MidiObserver* mo )
{
midiObservers.push_back( mo );
}
void registerMidiObserver( MidiObserver* mo );
void masterVolume( float vol ){masterVol = vol;}