Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit abe1bfb

Browse files
committedAug 27, 2024·
Safer
1 parent 73c035e commit abe1bfb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎src/board/audio/index.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ export class BoardAudio {
242242
this.stopRecording();
243243
}
244244
};
245-
246-
this.sensitivityNode!.connect(recorder);
247-
recorder.connect(this.context!.destination);
248-
249245
this.stopActiveRecording = () => {
250246
recorder.disconnect();
251247
this.sensitivityNode!.disconnect();
@@ -254,6 +250,9 @@ export class BoardAudio {
254250
this.microphoneEl.style.display = "none";
255251
this.stopActiveRecording = undefined;
256252
};
253+
254+
this.sensitivityNode!.connect(recorder);
255+
recorder.connect(this.context!.destination);
257256
}
258257

259258
boardStopped() {

‎src/examples/record.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
rate_index = 0
55

66
print("Recording...")
7-
my_track = microphone.record(3000)
7+
my_recording = microphone.record(3000)
8+
my_track = my_recording.track()
89
print("Button A to play")
910
while True:
1011
if button_a.was_pressed():

0 commit comments

Comments
 (0)
Please sign in to comment.