Skip to content

Commit

Permalink
feat: allow to set recording progress from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlowGrowth committed Sep 4, 2024
1 parent 43f13a5 commit ba115d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dsp/src/dsp/Recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class Recorder
size_t getCurrentRecordingLength() const { return currentLength_; }
bool isRecording() const { return isRecording_ || isFadingOut_; }

void setRecordingProgressForTesting(size_t numSamplesDone) { recHeadIdx_ = numSamplesDone; }

private:
static constexpr float defaultXFadeLengthInS_ = 0.1f;

Expand Down
2 changes: 2 additions & 0 deletions dsp/src/dsp/TapeLooper.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ class TapeLooper
static constexpr size_t getNumChannels() { return numChannels; }
static constexpr size_t getSampleRate() { return sampleRate; }

RecorderType& recorderForTesting() { return recorder_; }

private:
const LooperStoragePtr<numChannels> storage_;
LooperState state_;
Expand Down

0 comments on commit ba115d8

Please sign in to comment.