fix_merge

This commit is contained in:
Valentin Boettcher 2018-03-26 19:31:28 +02:00
commit ea8f6b2be5
3 changed files with 8 additions and 5 deletions

View file

@ -111,7 +111,8 @@ void Looper::process(unsigned int nframes, Buffers* buffers)
// record into buffer, play from buffer, etc // record into buffer, play from buffer, etc
if ( clips[clip]->recording() ) { if ( clips[clip]->recording() ) {
if(clips[clip]->getBeatsToRecord() > 0 && clips[clip]->getBeats() >= clips[clip]->getBeatsToRecord() - 4) if(clips[clip]->getBeatsToRecord() > 0 && clips[clip]->getBeats() >= clips[clip]->getBeatsToRecord() - 4)
clips[clip]->queuePlay(true); clips[clip]->queuePlay(true);
if ( clips[clip]->recordSpaceAvailable() < LOOPER_SAMPLES_BEFORE_REQUEST && if ( clips[clip]->recordSpaceAvailable() < LOOPER_SAMPLES_BEFORE_REQUEST &&
!clips[clip]->newBufferInTransit() ) { !clips[clip]->newBufferInTransit() ) {

View file

@ -51,7 +51,7 @@ void LooperClip::init()
_queuePlay = false; _queuePlay = false;
_queueStop = false; _queueStop = false;
_queueRecord= false; _queueRecord= false;
_wantedBeats= -0; _wantedBeats= -0;
if ( _buffer ) { if ( _buffer ) {
_buffer->init(); _buffer->init();

View file

@ -116,6 +116,7 @@ public:
///reset the play head to zero. Does nothing when recording ///reset the play head to zero. Does nothing when recording
void setPlayHead(float ph); void setPlayHead(float ph);
// set how many beats to record (up to full bar)
void setBarsToRecord(int bars); void setBarsToRecord(int bars);
int getBeatsToRecord(); int getBeatsToRecord();
int getBarsToRecord(); int getBarsToRecord();
@ -126,9 +127,9 @@ public:
#endif #endif
private: 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 * it. The current state of the grid is kept up-to-date by GridLogic
* abstracting detail away, sending GridLogic::State to Controllers. * abstracting detail away, sending GridLogic::State to Controllers.
**/ **/
@ -144,7 +145,8 @@ private:
float _playhead; float _playhead;
float _recordhead; float _recordhead;
int _wantedBeats; int _wantedBeats;
AudioBuffer* _buffer; AudioBuffer* _buffer;
}; };