70 inc = state_ == State::EMPTY || state_ == State::REC_FIRST
73 win_ = WindowVal(win_idx_ * kWindowFactor);
76 case State::EMPTY: sig = 0.0f;
break;
77 case State::REC_FIRST:
79 Write(pos_, input * win_);
80 if(win_idx_ < kWindowSamps - 1)
84 if(pos_ > buffer_size_ - 1)
86 state_ = State::PLAYING;
96 if(win_idx_ < kWindowSamps - 1)
98 Write(pos_, sig + input * (1.f - win_));
103 if(pos_ > recsize_ - 1)
116 if(rec_queue_ && mode_ == Mode::ONETIME_DUB)
119 state_ = State::REC_DUB;
128 case Mode::REPLACE: Write(pos_, input * win_);
break;
129 case Mode::FRIPPERTRONICS:
130 Write(pos_, (input * win_) + (sig * kFripDecayVal));
133 case Mode::ONETIME_DUB:
134 default: Write(pos_, (input * win_) + sig);
break;
136 if(win_idx_ < kWindowSamps - 1)
139 if(pos_ > recsize_ - 1)
149 if(hitloop && mode_ == Mode::ONETIME_DUB)
151 state_ = State::PLAYING;
158 near_beginning_ = state_ != State::EMPTY && !
Recording() && pos_ < 4800