Merge pull request #978 from kattni/audioio-rawsample-doc-fix

Fixed issue with code in docs for audioio
This commit is contained in:
Scott Shawcroft 2018-07-01 23:47:21 -07:00 committed by GitHub
commit 923ef3d702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);