Skip to content

Commit 50bc0c4

Browse files
rjtokenringdsammaruga
authored andcommitted
Fix example
1 parent 7dcb937 commit 50bc0c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/arduino/app_bricks/sound_generator/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ def __init__(
450450
if output_device is None:
451451
self.external_speaker = False
452452
self._output_device = Speaker(sample_rate=self.SAMPLE_RATE, format="FLOAT_LE")
453-
self.start()
454453
else:
455454
self.external_speaker = True
456455
self._output_device = output_device

src/arduino/app_bricks/sound_generator/examples/1_play_sequence.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
("B4", 1 / 8),
4646
("A4", 1),
4747
]
48-
for note, duration in fur_elise:
49-
player.play(note, duration)
5048

51-
App.run()
49+
def user_lp():
50+
for note, duration in fur_elise:
51+
player.play(note, duration)
52+
53+
App.run(user_loop=user_lp)

0 commit comments

Comments
 (0)