From 550296edc5ab58373aebc0040dea95980be5d2d2 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sun, 21 Apr 2024 09:45:02 +0100 Subject: [PATCH] Fix typo in speaker docs Closes #1799 --- doc/guides/speaker_audio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/speaker_audio.md b/doc/guides/speaker_audio.md index 2a09c06e7..d29cfc32f 100644 --- a/doc/guides/speaker_audio.md +++ b/doc/guides/speaker_audio.md @@ -131,7 +131,7 @@ ## Storing audio First, we require the dfpwm module and call [`cc.audio.dfpwm.make_decoder`] to construct a new decoder. This decoder accepts blocks of DFPWM data and converts it to a list of 8-bit amplitudes, which we can then play with our speaker. -As mentioned above, [`speaker.playAudio`] accepts at most 128×1024 samples in one go. DFPMW uses a single bit for each +As mentioned above, [`speaker.playAudio`] accepts at most 128×1024 samples in one go. DFPWM uses a single bit for each sample, which means we want to process our audio in chunks of 16×1024 bytes (16KiB). In order to do this, we use [`io.lines`], which provides a nice way to loop over chunks of a file. You can of course just use [`fs.open`] and [`fs.ReadHandle.read`] if you prefer.