From a10c61ef89ff5a8ed8c66fc987a5d4e7deab666c Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Fri, 29 Jun 2018 16:46:25 -0400 Subject: [PATCH] Fixed issue with code in docs for audioio Removed incorrect arg from RawSample in AudioOut example code. Replaced variable sample with dac. --- shared-bindings/audioio/AudioOut.c | 4 ++-- shared-bindings/audioio/RawSample.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/audioio/AudioOut.c b/shared-bindings/audioio/AudioOut.c index 36de117ac8..97fe2dce5b 100644 --- a/shared-bindings/audioio/AudioOut.c +++ b/shared-bindings/audioio/AudioOut.c @@ -65,10 +65,10 @@ //| 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, mono=True, sample_rate=8000) +//| sine_wave = audioio.RawSample(sine_wave, sample_rate=8000) //| dac.play(sine_wave, loop=True) //| time.sleep(1) -//| sample.stop() +//| dac.stop() //| //| Playing a wave file from flash:: //| diff --git a/shared-bindings/audioio/RawSample.c b/shared-bindings/audioio/RawSample.c index 3f8f71a1f1..a66145931c 100644 --- a/shared-bindings/audioio/RawSample.c +++ b/shared-bindings/audioio/RawSample.c @@ -70,7 +70,7 @@ //| sine_wave = audioio.RawSample(sine_wave) //| dac.play(sine_wave, loop=True) //| time.sleep(1) -//| sample.stop() +//| dac.stop() //| STATIC mp_obj_t audioio_rawsample_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) { mp_arg_check_num(n_args, n_kw, 1, 2, true);