summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jeff@adafruit.com>2020-05-18 11:57:02 -0500
committerGitHub <noreply@github.com>2020-05-18 11:57:02 -0500
commite7662623f8788b4ee5355ee54dd78e9b9b7d310a (patch)
treee79350c5a9e1d63898b11678fcd63d8d56f7dcf7
parent2314f988b180615439635ec30e81f80085724c2f (diff)
Fix mistake in sine wave sampleaudiocore-rawsample-sinewave
Similar to https://github.com/adafruit/Adafruit_Learning_System_Guides/issues/979 -- is this the source from which all the errors spring?
-rw-r--r--shared-bindings/audiocore/RawSample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c
index c0f9325e6..2eadf1fab 100644
--- a/shared-bindings/audiocore/RawSample.c
+++ b/shared-bindings/audiocore/RawSample.c
@@ -61,7 +61,7 @@
//| length = 8000 // 440
//| sine_wave = array.array("h", [0] * length)
//| for i in range(length):
-//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15))
+//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))
//|
//| dac = audioio.AudioOut(board.SPEAKER)
//| sine_wave = audiocore.RawSample(sine_wave)