Skip to content

Commit b7d995d

Browse files
committed
Update comment.
1 parent 29bcd74 commit b7d995d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
audio = AudioOut(board.SPEAKER)
3535
sine_wave_sample = RawSample(sine_wave)
3636

37-
audio.play(sine_wave_sample, loop=True) # Keep playing the sample over and over
38-
time.sleep(1) # until...
39-
audio.stop() # We tell the board to stop
37+
# A single sine wave sample is hundredths of a second long. If you set loop=False, it will play
38+
# a single instance of the sample (a quick burst of sound) and then silence for the rest of the
39+
# duration of the time.sleep(). If loop=True, it will play the single instance of the sample
40+
# continuously for the duration of the time.sleep().
41+
audio.play(sine_wave_sample, loop=True) # Play the single sine_wave sample continuously...
42+
time.sleep(1) # for the duration of the sleep (in seconds)
43+
audio.stop() # and then stop.

0 commit comments

Comments
 (0)