From 6e2b5b43961424c3ff06c1d6937098acd4545246 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Sun, 25 Mar 2018 20:49:24 +0200 Subject: [PATCH] Formatting --- src/looper.cxx | 4 ++-- src/looperclip.cxx | 8 +++----- src/looperclip.hxx | 13 +++++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/looper.cxx b/src/looper.cxx index bae7cf1..6cf7b4c 100644 --- a/src/looper.cxx +++ b/src/looper.cxx @@ -110,8 +110,8 @@ void Looper::process(unsigned int nframes, Buffers* buffers) // handle state of clip, and do what needs doing: // record into buffer, play from buffer, etc if ( clips[clip]->recording() ) { - if(clips[clip]->getWantedBeats() > 0 && clips[clip]->getBeats() >= clips[clip]->getWantedBeats() - 4) - clips[clip]->queuePlay(true); + if(clips[clip]->getWantedBeats() > 0 && clips[clip]->getBeats() >= clips[clip]->getWantedBeats() - 4) + cips[clip]->queuePlay(true); if ( clips[clip]->recordSpaceAvailable() < LOOPER_SAMPLES_BEFORE_REQUEST && !clips[clip]->newBufferInTransit() ) { diff --git a/src/looperclip.cxx b/src/looperclip.cxx index 328768c..4098c4e 100644 --- a/src/looperclip.cxx +++ b/src/looperclip.cxx @@ -51,7 +51,7 @@ void LooperClip::init() _queuePlay = false; _queueStop = false; _queueRecord= false; - _wantedBeats= -0; + _wantedBeats= -0; if ( _buffer ) { _buffer->init(); @@ -60,8 +60,6 @@ void LooperClip::init() _playhead = 0; _recordhead = 0; - - } void LooperClip::save() @@ -190,12 +188,12 @@ void LooperClip::setPlayHead(float ph) void LooperClip::setWantedBeats(int beats) { - _wantedBeats = beats; + _wantedBeats = beats; } int LooperClip::getWantedBeats() { - return _wantedBeats; + return _wantedBeats; } void LooperClip::record(int count, float* L, float* R) diff --git a/src/looperclip.hxx b/src/looperclip.hxx index 872a84e..fec69d2 100644 --- a/src/looperclip.hxx +++ b/src/looperclip.hxx @@ -116,9 +116,9 @@ public: ///reset the play head to zero. Does nothing when recording void setPlayHead(float ph); - void setWantedBeats(int beats); - - int getWantedBeats(); + // set how many beats to record (up to full bar) + void setWantedBeats(int beats); + int getWantedBeats(); #ifdef BUILD_TESTS // used only in test cases @@ -126,9 +126,9 @@ public: #endif private: - int track, scene; + int track, scene; - /** Luppp needs more than the current state of the clip to accuratly handle + /** Luppp needs more than the current state of the clip to accuratly handle * it. The current state of the grid is kept up-to-date by GridLogic * abstracting detail away, sending GridLogic::State to Controllers. **/ @@ -144,7 +144,8 @@ private: float _playhead; float _recordhead; - int _wantedBeats; + int _wantedBeats; + AudioBuffer* _buffer; };