|
38 | 38 |
|
39 | 39 | //| .. currentmodule:: audiopwmio |
40 | 40 | //| |
41 | | -//| :class:`AudioOut` -- Output an analog audio signal |
| 41 | +//| :class:`PWMAudioOut` -- Output an analog audio signal |
42 | 42 | //| ======================================================== |
43 | 43 | //| |
44 | 44 | //| AudioOut can be used to output an analog audio signal on a given pin. |
45 | 45 | //| |
46 | | -//| .. class:: AudioOut(left_channel, *, right_channel=None, quiescent_value=0x8000) |
| 46 | +//| .. class:: PWMAudioOut(left_channel, *, right_channel=None, quiescent_value=0x8000) |
47 | 47 | //| |
48 | | -//| Create a AudioOut object associated with the given pin(s). This allows you to |
| 48 | +//| Create a PWMAudioOut object associated with the given pin(s). This allows you to |
49 | 49 | //| play audio signals out on the given pin(s). In contrast to mod:`audioio`, |
50 | 50 | //| the pin(s) specified are digital pins, and are driven with a device-dependent PWM |
51 | 51 | //| signal. |
|
70 | 70 | //| for i in range(length): |
71 | 71 | //| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15) |
72 | 72 | //| |
73 | | -//| dac = audiopwmio.AudioOut(board.SPEAKER) |
| 73 | +//| dac = audiopwmio.PWMAudioOut(board.SPEAKER) |
74 | 74 | //| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000) |
75 | 75 | //| dac.play(sine_wave, loop=True) |
76 | 76 | //| time.sleep(1) |
|
89 | 89 | //| |
90 | 90 | //| data = open("cplay-5.1-16bit-16khz.wav", "rb") |
91 | 91 | //| wav = audiocore.WaveFile(data) |
92 | | -//| a = audiopwmio.AudioOut(board.SPEAKER) |
| 92 | +//| a = audiopwmio.PWMAudioOut(board.SPEAKER) |
93 | 93 | //| |
94 | 94 | //| print("playing") |
95 | 95 | //| a.play(wav) |
@@ -128,7 +128,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_make_new(const mp_obj_type_t *type, size_ |
128 | 128 |
|
129 | 129 | //| .. method:: deinit() |
130 | 130 | //| |
131 | | -//| Deinitialises the AudioOut and releases any hardware resources for reuse. |
| 131 | +//| Deinitialises the PWMAudioOut and releases any hardware resources for reuse. |
132 | 132 | //| |
133 | 133 | STATIC mp_obj_t audiopwmio_pwmaudioout_deinit(mp_obj_t self_in) { |
134 | 134 | audiopwmio_pwmaudioout_obj_t *self = MP_OBJ_TO_PTR(self_in); |
|
0 commit comments