Skip to content
Snippets Groups Projects
Commit 80fa0426 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Fix slight bug

parent bf9d86e9
No related branches found
No related tags found
No related merge requests found
......@@ -173,10 +173,9 @@ void setup() {
// Initialize the Delay at a length of 1 second
delayline.Init();
delayline.SetDelay(samplerate);
load.Init(sample_rate, blocksize);
delayline.SetDelay(sample_rate);
// Start serial communications
Serial.begin(250000);
Serial.println("Serial communication started");
......
......@@ -56,15 +56,15 @@ class Looper {
rec_env_pos_inc = is_recording ? 1 : -1;
}
void SetLoop(const float loop_start, const float loop_length) {
void SetLoop(const float loop_start_time, const float loop_length_time) {
// Set the start of the next loop
pending_loop_start = static_cast<size_t>(loop_start * (buffer_length - 1));
pending_loop_start = static_cast<size_t>(loop_start_time * (buffer_length - 1));
// If the current loop start is not set yet, set it too
if (!is_loop_set) loop_start = pending_loop_start;
// Set the length of the next loop
pendingloop_length = max(kMinLoopLength, static_cast<size_t>(loop_length * buffer_length));
pendingloop_length = max(kMinLoopLength, static_cast<size_t>(loop_length_time * buffer_length));
// CHECK if this is truly good
// loop_length = pendingloop_length;
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment