docs: corrections that stem from the "audiocore" rename
This commit is contained in:
parent
324d31225c
commit
a53720810b
@ -56,7 +56,7 @@
|
||||
//| using `UDA1334 Breakout <https://www.adafruit.com/product/3678>`_::
|
||||
//|
|
||||
//| import audiobusio
|
||||
//| import audioio
|
||||
//| import audiocore
|
||||
//| import board
|
||||
//| import array
|
||||
//| import time
|
||||
@ -68,7 +68,7 @@
|
||||
//| for i in range(length):
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
|
||||
//|
|
||||
//| sine_wave = audiobusio.RawSample(sine_wave, sample_rate=8000)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
|
||||
//| i2s = audiobusio.I2SOut(board.D1, board.D0, board.D9)
|
||||
//| i2s.play(sine_wave, loop=True)
|
||||
//| time.sleep(1)
|
||||
@ -78,12 +78,13 @@
|
||||
//|
|
||||
//| import board
|
||||
//| import audioio
|
||||
//| import audiocore
|
||||
//| import audiobusio
|
||||
//| import digitalio
|
||||
//|
|
||||
//|
|
||||
//| f = open("cplay-5.1-16bit-16khz.wav", "rb")
|
||||
//| wav = audioio.WaveFile(f)
|
||||
//| wav = audiocore.WaveFile(f)
|
||||
//|
|
||||
//| a = audiobusio.I2SOut(board.D1, board.D0, board.D9)
|
||||
//|
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "shared-bindings/util.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
//| .. currentmodule:: audioio
|
||||
//| .. currentmodule:: audiocore
|
||||
//|
|
||||
//| :class:`Mixer` -- Mixes one or more audio samples together
|
||||
//| ===========================================================
|
||||
@ -54,15 +54,16 @@
|
||||
//|
|
||||
//| import board
|
||||
//| import audioio
|
||||
//| import audiocore
|
||||
//| import digitalio
|
||||
//|
|
||||
//| # Required for CircuitPlayground Express
|
||||
//| speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
|
||||
//| speaker_enable.switch_to_output(value=True)
|
||||
//|
|
||||
//| music = audioio.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
|
||||
//| drum = audioio.WaveFile(open("drum.wav", "rb"))
|
||||
//| mixer = audioio.Mixer(voice_count=2, sample_rate=16000, channel_count=1, bits_per_sample=16, samples_signed=True)
|
||||
//| music = audiocore.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
|
||||
//| drum = audiocore.WaveFile(open("drum.wav", "rb"))
|
||||
//| mixer = audiocore.Mixer(voice_count=2, sample_rate=16000, channel_count=1, bits_per_sample=16, samples_signed=True)
|
||||
//| a = audioio.AudioOut(board.A0)
|
||||
//|
|
||||
//| print("playing")
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "shared-bindings/audiocore/RawSample.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
//| .. currentmodule:: audioio
|
||||
//| .. currentmodule:: audiocore
|
||||
//|
|
||||
//| :class:`RawSample` -- A raw audio sample buffer
|
||||
//| ========================================================
|
||||
@ -55,6 +55,7 @@
|
||||
//|
|
||||
//| Simple 8ksps 440 Hz sin wave::
|
||||
//|
|
||||
//| import audiocore
|
||||
//| import audioio
|
||||
//| import board
|
||||
//| import array
|
||||
@ -68,7 +69,7 @@
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15))
|
||||
//|
|
||||
//| dac = audioio.AudioOut(board.SPEAKER)
|
||||
//| sine_wave = audioio.RawSample(sine_wave)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave)
|
||||
//| dac.play(sine_wave, loop=True)
|
||||
//| time.sleep(1)
|
||||
//| dac.stop()
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "shared-bindings/util.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
//| .. currentmodule:: audioio
|
||||
//| .. currentmodule:: audiocore
|
||||
//|
|
||||
//| :class:`WaveFile` -- Load a wave file for audio playback
|
||||
//| ========================================================
|
||||
@ -50,6 +50,7 @@
|
||||
//| Playing a wave file from flash::
|
||||
//|
|
||||
//| import board
|
||||
//| import audiocore
|
||||
//| import audioio
|
||||
//| import digitalio
|
||||
//|
|
||||
@ -58,7 +59,7 @@
|
||||
//| speaker_enable.switch_to_output(value=True)
|
||||
//|
|
||||
//| data = open("cplay-5.1-16bit-16khz.wav", "rb")
|
||||
//| wav = audioio.WaveFile(data)
|
||||
//| wav = audiocore.WaveFile(data)
|
||||
//| a = audioio.AudioOut(board.A0)
|
||||
//|
|
||||
//| print("playing")
|
||||
|
@ -55,6 +55,7 @@
|
||||
//|
|
||||
//| Simple 8ksps 440 Hz sin wave::
|
||||
//|
|
||||
//| import audiocore
|
||||
//| import audioio
|
||||
//| import board
|
||||
//| import array
|
||||
@ -68,7 +69,7 @@
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
|
||||
//|
|
||||
//| dac = audioio.AudioOut(board.SPEAKER)
|
||||
//| sine_wave = audioio.RawSample(sine_wave, sample_rate=8000)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
|
||||
//| dac.play(sine_wave, loop=True)
|
||||
//| time.sleep(1)
|
||||
//| dac.stop()
|
||||
@ -84,7 +85,7 @@
|
||||
//| speaker_enable.switch_to_output(value=True)
|
||||
//|
|
||||
//| data = open("cplay-5.1-16bit-16khz.wav", "rb")
|
||||
//| wav = audioio.WaveFile(data)
|
||||
//| wav = audiocore.WaveFile(data)
|
||||
//| a = audioio.AudioOut(board.A0)
|
||||
//|
|
||||
//| print("playing")
|
||||
|
Loading…
Reference in New Issue
Block a user