|
33 | 33 | #include "shared-bindings/audioio/__init__.h"
|
34 | 34 | #include "shared-bindings/audioio/AudioOut.h"
|
35 | 35 |
|
| 36 | +#ifdef CIRCUITPY_AUDIOIO_COMPAT |
| 37 | +#include "shared-bindings/audiocore/Mixer.h" |
| 38 | +#include "shared-bindings/audiocore/RawSample.h" |
| 39 | +#include "shared-bindings/audiocore/WaveFile.h" |
| 40 | +#endif |
| 41 | + |
36 | 42 | //| :mod:`audioio` --- Support for audio input and output
|
37 | 43 | //| ======================================================
|
38 | 44 | //|
|
|
57 | 63 | //| Since CircuitPython 5, `Mixer`, `RawSample` and `WaveFile` are moved
|
58 | 64 | //| to :mod:`audiocore`.
|
59 | 65 | //|
|
| 66 | +//| For compatibility with CircuitPython 4.x, some builds allow the items in |
| 67 | +//| `audiocore` to be imported from `audioio`. This will be removed for all |
| 68 | +//| boards in a future build of CicuitPython. |
| 69 | +//| |
60 | 70 |
|
61 | 71 | STATIC const mp_rom_map_elem_t audioio_module_globals_table[] = {
|
62 | 72 | { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audioio) },
|
63 | 73 | { MP_ROM_QSTR(MP_QSTR_AudioOut), MP_ROM_PTR(&audioio_audioout_type) },
|
| 74 | +#ifdef CIRCUITPY_AUDIOIO_COMPAT |
| 75 | + { MP_ROM_QSTR(MP_QSTR_Mixer), MP_ROM_PTR(&audioio_mixer_type) }, |
| 76 | + { MP_ROM_QSTR(MP_QSTR_RawSample), MP_ROM_PTR(&audioio_rawsample_type) }, |
| 77 | + { MP_ROM_QSTR(MP_QSTR_WaveFile), MP_ROM_PTR(&audioio_wavefile_type) }, |
| 78 | +#endif |
64 | 79 | };
|
65 | 80 |
|
66 | 81 | STATIC MP_DEFINE_CONST_DICT(audioio_module_globals, audioio_module_globals_table);
|
|
0 commit comments