Skip to content

Commit a537208

Browse files
committed
docs: corrections that stem from the "audiocore" rename
1 parent 324d312 commit a537208

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

shared-bindings/audiobusio/I2SOut.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
//| using `UDA1334 Breakout <https://www.adafruit.com/product/3678>`_::
5757
//|
5858
//| import audiobusio
59-
//| import audioio
59+
//| import audiocore
6060
//| import board
6161
//| import array
6262
//| import time
@@ -68,7 +68,7 @@
6868
//| for i in range(length):
6969
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
7070
//|
71-
//| sine_wave = audiobusio.RawSample(sine_wave, sample_rate=8000)
71+
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
7272
//| i2s = audiobusio.I2SOut(board.D1, board.D0, board.D9)
7373
//| i2s.play(sine_wave, loop=True)
7474
//| time.sleep(1)
@@ -78,12 +78,13 @@
7878
//|
7979
//| import board
8080
//| import audioio
81+
//| import audiocore
8182
//| import audiobusio
8283
//| import digitalio
8384
//|
8485
//|
8586
//| f = open("cplay-5.1-16bit-16khz.wav", "rb")
86-
//| wav = audioio.WaveFile(f)
87+
//| wav = audiocore.WaveFile(f)
8788
//|
8889
//| a = audiobusio.I2SOut(board.D1, board.D0, board.D9)
8990
//|

shared-bindings/audiocore/Mixer.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "shared-bindings/util.h"
3737
#include "supervisor/shared/translate.h"
3838

39-
//| .. currentmodule:: audioio
39+
//| .. currentmodule:: audiocore
4040
//|
4141
//| :class:`Mixer` -- Mixes one or more audio samples together
4242
//| ===========================================================
@@ -54,15 +54,16 @@
5454
//|
5555
//| import board
5656
//| import audioio
57+
//| import audiocore
5758
//| import digitalio
5859
//|
5960
//| # Required for CircuitPlayground Express
6061
//| speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
6162
//| speaker_enable.switch_to_output(value=True)
6263
//|
63-
//| music = audioio.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
64-
//| drum = audioio.WaveFile(open("drum.wav", "rb"))
65-
//| mixer = audioio.Mixer(voice_count=2, sample_rate=16000, channel_count=1, bits_per_sample=16, samples_signed=True)
64+
//| music = audiocore.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
65+
//| drum = audiocore.WaveFile(open("drum.wav", "rb"))
66+
//| mixer = audiocore.Mixer(voice_count=2, sample_rate=16000, channel_count=1, bits_per_sample=16, samples_signed=True)
6667
//| a = audioio.AudioOut(board.A0)
6768
//|
6869
//| print("playing")

shared-bindings/audiocore/RawSample.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "shared-bindings/audiocore/RawSample.h"
3636
#include "supervisor/shared/translate.h"
3737

38-
//| .. currentmodule:: audioio
38+
//| .. currentmodule:: audiocore
3939
//|
4040
//| :class:`RawSample` -- A raw audio sample buffer
4141
//| ========================================================
@@ -55,6 +55,7 @@
5555
//|
5656
//| Simple 8ksps 440 Hz sin wave::
5757
//|
58+
//| import audiocore
5859
//| import audioio
5960
//| import board
6061
//| import array
@@ -68,7 +69,7 @@
6869
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15))
6970
//|
7071
//| dac = audioio.AudioOut(board.SPEAKER)
71-
//| sine_wave = audioio.RawSample(sine_wave)
72+
//| sine_wave = audiocore.RawSample(sine_wave)
7273
//| dac.play(sine_wave, loop=True)
7374
//| time.sleep(1)
7475
//| dac.stop()

shared-bindings/audiocore/WaveFile.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "shared-bindings/util.h"
3434
#include "supervisor/shared/translate.h"
3535

36-
//| .. currentmodule:: audioio
36+
//| .. currentmodule:: audiocore
3737
//|
3838
//| :class:`WaveFile` -- Load a wave file for audio playback
3939
//| ========================================================
@@ -50,6 +50,7 @@
5050
//| Playing a wave file from flash::
5151
//|
5252
//| import board
53+
//| import audiocore
5354
//| import audioio
5455
//| import digitalio
5556
//|
@@ -58,7 +59,7 @@
5859
//| speaker_enable.switch_to_output(value=True)
5960
//|
6061
//| data = open("cplay-5.1-16bit-16khz.wav", "rb")
61-
//| wav = audioio.WaveFile(data)
62+
//| wav = audiocore.WaveFile(data)
6263
//| a = audioio.AudioOut(board.A0)
6364
//|
6465
//| print("playing")

shared-bindings/audioio/AudioOut.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
//|
5656
//| Simple 8ksps 440 Hz sin wave::
5757
//|
58+
//| import audiocore
5859
//| import audioio
5960
//| import board
6061
//| import array
@@ -68,7 +69,7 @@
6869
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
6970
//|
7071
//| dac = audioio.AudioOut(board.SPEAKER)
71-
//| sine_wave = audioio.RawSample(sine_wave, sample_rate=8000)
72+
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
7273
//| dac.play(sine_wave, loop=True)
7374
//| time.sleep(1)
7475
//| dac.stop()
@@ -84,7 +85,7 @@
8485
//| speaker_enable.switch_to_output(value=True)
8586
//|
8687
//| data = open("cplay-5.1-16bit-16khz.wav", "rb")
87-
//| wav = audioio.WaveFile(data)
88+
//| wav = audiocore.WaveFile(data)
8889
//| a = audioio.AudioOut(board.A0)
8990
//|
9091
//| print("playing")

0 commit comments

Comments
 (0)