File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
shared-bindings/audiocore Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 32
32
//| :param ~circuitpython_typing.ReadableBuffer buffer: A buffer with samples
33
33
//| :param int channel_count: The number of channels in the buffer
34
34
//| :param int sample_rate: The desired playback sample rate
35
- //| :param bool single_buffer: Selects single buffered or double buffered transfer mode. This affects sample looping
36
- //| and what happens if the sample buffer is changed while the sample is playing.
37
- //| In single buffered transfers, samples will play once unless the play method is invoked with
38
- //| loop=True. A change in buffer contents will not affect active playback.
39
- //| In double buffered transfers, samples are always looped, and changed buffer contents will
40
- //| be played back as soon as transfer reaches the next half-buffer point.
35
+ //| :param bool single_buffer: Selects single buffered or double buffered transfer mode. This affects
36
+ //| what happens if the sample buffer is changed while the sample is playing.
37
+ //| In single buffered transfers, a change in buffer contents will not affect active playback.
38
+ //| In double buffered transfers, changed buffer contents will
39
+ //| be played back when the transfer reaches the next half-buffer point.
41
40
//|
42
41
//| Playing 8ksps 440 Hz and 880 Hz sine waves::
43
42
//|
69
68
//|
70
69
//| # Play double-buffered
71
70
//| sample = audiocore.RawSample(sine_wave, single_buffer=False)
72
- //| pwm.play(sample)
71
+ //| pwm.play(sample, loop=True )
73
72
//| time.sleep(3)
74
73
//| # changing the wave takes effect almost immediately
75
74
//| for i in range(length):
You can’t perform that action at this time.
0 commit comments