diff --git a/src/avtk/avtk_clip_selector.h b/src/avtk/avtk_clip_selector.h index f5baea2..096f53d 100644 --- a/src/avtk/avtk_clip_selector.h +++ b/src/avtk/avtk_clip_selector.h @@ -32,7 +32,7 @@ #include "../worker.hxx" #include "../looper.hxx" -#include "../audiobuffer.hxx"./ +#include "../audiobuffer.hxx" #include "../eventhandler.hxx" diff --git a/src/avtk/avtk_sidechain_gain.h b/src/avtk/avtk_sidechain_gain.h index c41d974..35dc97c 100644 --- a/src/avtk/avtk_sidechain_gain.h +++ b/src/avtk/avtk_sidechain_gain.h @@ -323,6 +323,8 @@ class SidechainGain : public Fl_Slider return Fl_Widget::handle(event); } */ + + return 0; } private: diff --git a/src/avtk/avtk_volume.h b/src/avtk/avtk_volume.h index fdc9751..b7c480a 100644 --- a/src/avtk/avtk_volume.h +++ b/src/avtk/avtk_volume.h @@ -97,11 +97,6 @@ class Volume : public Fl_Slider //cairo_set_source_rgb( cr, 28 / 255.f, 28 / 255.f , 28 / 255.f ); cairo_fill( cr ); - - // set up dashed lines, 1 px off, 1 px on - double dashes[1]; - dashes[0] = 2.0; - //cairo_set_dash ( cr, dashes, 1, 0.0); cairo_set_line_width( cr, 1.0); diff --git a/src/gridlogic.cxx b/src/gridlogic.cxx index e71071b..0b4f3a2 100644 --- a/src/gridlogic.cxx +++ b/src/gridlogic.cxx @@ -5,6 +5,17 @@ extern Jack* jack; + +const char* StateString[8] = { + "empty", + "playing", + "play queued", + "loaded", + "stop queued", + "recording", + "record queued" +}; + GridLogic::GridLogic() { diff --git a/src/gridlogic.hxx b/src/gridlogic.hxx index ba7eaf6..a5a296e 100644 --- a/src/gridlogic.hxx +++ b/src/gridlogic.hxx @@ -36,16 +36,6 @@ class GridLogic : public TimeObserver STATE_RECORD_QUEUED, }; - const char* StateString[8] = { - "empty", - "playing", - "play queued", - "loaded", - "stop queued", - "recording", - "record queued" - }; - GridLogic(); /// button press / click event @@ -68,6 +58,7 @@ class GridLogic : public TimeObserver /// contains the current state of each grid square State state[NTRACKS*NSCENES]; + static const char* StateString[8]; }; diff --git a/src/jack.cxx b/src/jack.cxx index bbea9cc..8eb6af7 100644 --- a/src/jack.cxx +++ b/src/jack.cxx @@ -14,16 +14,17 @@ using namespace std; extern int jackSamplerate; Jack::Jack() : - clientActive(false), - client( 0 ), - controllerUpdater( new ControllerUpdater() ), + client( jack_client_open ( "Luppp", JackNullOption , 0 , 0 ) ), timeManager(), metronome( new Metronome() ), logic( new Logic() ), - gridLogic( new GridLogic() ) + gridLogic( new GridLogic() ), + controllerUpdater( new ControllerUpdater() ), + + clientActive(false) { /// open the client - client = jack_client_open ( "Luppp", JackNullOption , 0 , 0 ); + //client = ; buffers.nframes = jack_get_buffer_size( client ); buffers.samplerate = jack_get_sample_rate( client ); @@ -173,7 +174,7 @@ int Jack::process (jack_nframes_t nframes) writeToGuiRingbuffer( &e ); // run each event trought the midiObservers vector - for( int i = 0; i < midiObservers.size(); i++ ) + for(unsigned int i = 0; i < midiObservers.size(); i++ ) { midiObservers.at(i)->midi( (unsigned char*) &in_event.buffer[0] ); } @@ -183,7 +184,7 @@ int Jack::process (jack_nframes_t nframes) } /// process each track, starting at output and working up signal path - for(uint i = 0; i < NTRACKS; i++) + for(unsigned int i = 0; i < NTRACKS; i++) { trackOutputs.at(i)->process( nframes, &buffers ); } @@ -222,7 +223,7 @@ int Jack::process (jack_nframes_t nframes) uiUpdateCounter += nframes; - for(int i = 0; i < buffers.nframes; i++) + for(unsigned int i = 0; i < buffers.nframes; i++) { float tmp = 0.f; for(int t = 0; t < NTRACKS; t++) diff --git a/src/jack.hxx b/src/jack.hxx index 5a1ce66..d35599e 100644 --- a/src/jack.hxx +++ b/src/jack.hxx @@ -61,6 +61,8 @@ class Jack void writeApcOutput( unsigned char* data ); private: + jack_client_t* client; + Buffers buffers; TimeManager timeManager; Metronome* metronome; @@ -84,7 +86,6 @@ class Jack // JACK member variables bool clientActive; - jack_client_t* client; jack_port_t* masterInput; jack_port_t* masterOutputL; diff --git a/src/looper.cxx b/src/looper.cxx index d948344..d0ded66 100644 --- a/src/looper.cxx +++ b/src/looper.cxx @@ -180,7 +180,6 @@ void Looper::setSample(int scene, AudioBuffer* ab) void Looper::process(int nframes, Buffers* buffers) { - float* in = buffers->audio[Buffers::MASTER_INPUT]; float* out = buffers->audio[Buffers::TRACK_0 + track]; // process each clip individually: this allows for playback of one clip, @@ -239,7 +238,7 @@ void Looper::process(int nframes, Buffers* buffers) } playPoint += 1.0; //playbackSpeed; - //*out++ = sin( playPoint * 440 * 6.24 ); + //out++ = sin( playPoint * 440 * 6.24 ); *trk = tmpBuffer[i]; *out++ = *trk++; } @@ -255,18 +254,6 @@ void Looper::process(int nframes, Buffers* buffers) } uiUpdateCounter += nframes; } - /* - // stopRecordOnBar ensures we record right up to the bar measure - else if ( state == STATE_RECORDING || stopRecordOnBar ) - { - for(int i = 0; i < nframes; i++) - { - if ( lastWrittenSampleIndex < SAMPLE_SIZE ) - { - sample[lastWrittenSampleIndex++] = in[i]; - } - } - } */ } diff --git a/src/looperclip.hxx b/src/looperclip.hxx index f55c19e..3926860 100644 --- a/src/looperclip.hxx +++ b/src/looperclip.hxx @@ -75,7 +75,6 @@ class LooperClip writeToGuiRingbuffer( &e ); } - printf("New buffer size = %i\n", ab->getData().size() ); _buffer = ab; _newBufferInTransit = false; diff --git a/src/worker.hxx b/src/worker.hxx index c271857..a9e0e3a 100644 --- a/src/worker.hxx +++ b/src/worker.hxx @@ -36,17 +36,6 @@ namespace Worker return 0; } - /// allocates a new audiobuffer of the desired size and returns it - static AudioBuffer* allocateNewBuffer(int size) - { - AudioBuffer* ab = new AudioBuffer(); - - std::vector buf( size, 0.f ); - - ab->nonRtSetSample( buf ); - - return ab; - } } #endif // LUPPP_WORKER_H