Looper: regression coverage for record-after-reset (both paths)
Add quantizedRecordsAgainAfterReset, driving the beat-quantized applyQuantizedTransport generation-guard path across a reset, plus the immediate-path recordsAgainAfterReset. Both confirm the transport state machine re-enters recording/playing correctly after a reset. Expose applyQuantizedTransport / QuantizedAction as internal for the test seam. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -594,7 +594,7 @@ public final class LooperPedal: Pedal {
|
||||
startPlayback(overdubTrack: nil, at: hostEngine?.currentTime ?? 0)
|
||||
}
|
||||
|
||||
private enum QuantizedAction: Sendable {
|
||||
enum QuantizedAction: Sendable {
|
||||
case beginMaster
|
||||
case closeMaster
|
||||
}
|
||||
@@ -628,7 +628,7 @@ public final class LooperPedal: Pedal {
|
||||
routine.start(engine: engine)
|
||||
}
|
||||
|
||||
private func applyQuantizedTransport(_ action: QuantizedAction, generation: Int, at beatSample: SampleTime?) {
|
||||
func applyQuantizedTransport(_ action: QuantizedAction, generation: Int, at beatSample: SampleTime?) {
|
||||
guard generation == transportGeneration else { return }
|
||||
switch action {
|
||||
case .beginMaster: beginMasterRecording(at: beatSample)
|
||||
|
||||
Reference in New Issue
Block a user