Merge pull request #978 from kattni/audioio-rawsample-doc-fix
Fixed issue with code in docs for audioio
This commit is contained in:
commit
923ef3d702
@ -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::
|
||||
//|
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user