Commit 2fd87dbb authored by Georg Krause's avatar Georg Krause

Keep recordhead and buffers AudioFrames in sync

parent 89c0e98c
Pipeline #889 passed with stages
in 48 seconds
......@@ -118,6 +118,7 @@ void LooperClip::load( AudioBuffer* ab )
// set the endpoint to the buffer's size
_recordhead = _buffer->getSize();
_recFpb = _recordhead / _buffer->getBeats();
_buffer->setAudioFrames(_recordhead);
#ifdef DEBUG_BUFFER
char buffer [50];
......@@ -207,6 +208,7 @@ void LooperClip::record(int count, float* L, float* R)
_buffer->getDataL().at( _recordhead ) = *L++;
_buffer->getDataR().at( _recordhead ) = *R++;
_recordhead++;
_buffer->setAudioFrames(_recordhead);
} else {
// break: this is *BAD*, audio data is lost but the buffer isn't here
// yet to hold new audio data so there's no option. This has not been
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment