Fixed issue with code in docs for audioio

Removed incorrect arg from RawSample in AudioOut example code.
Replaced variable sample with dac.
This commit is contained in:
Kattni Rembor 2018-06-29 16:46:25 -04:00
parent a405892d8a
commit a10c61ef89
2 changed files with 3 additions and 3 deletions

View File

@ -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::
//|

View File

@ -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);