Skip to content

Commit

Permalink
Fix: stop recording on next state
Browse files Browse the repository at this point in the history
  • Loading branch information
domi7777 authored Oct 28, 2024
1 parent a3b6330 commit f6812a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class Loop {
this.state = 'recording';
break;
case 'recording':
this.stopRecording();
this.state = 'playing';
break;
case 'readyToPlay':
Expand All @@ -90,9 +91,6 @@ export class Loop {
}

private startPlaying() {
if (this.isRecording()) {
this.stopRecording();
}
const playLoop = () => {
if (this.currentLoopIndex >= this.loop.length) {
this.currentLoopIndex = 0;
Expand Down

0 comments on commit f6812a7

Please sign in to comment.