|
30 | 30 | #include "lib/utils/context_manager_helpers.h" |
31 | 31 | #include "py/objproperty.h" |
32 | 32 | #include "py/runtime.h" |
33 | | -#include "shared-bindings/audiomp3/MP3File.h" |
| 33 | +#include "shared-bindings/audiomp3/MP3Decoder.h" |
34 | 34 | #include "shared-bindings/util.h" |
35 | 35 | #include "supervisor/shared/translate.h" |
36 | 36 |
|
37 | 37 | //| .. currentmodule:: audiomp3 |
38 | 38 | //| |
39 | | -//| :class:`MP3` -- Load a mp3 file for audio playback |
| 39 | +//| :class:`MP3Decoder` -- Load a mp3 file for audio playback |
40 | 40 | //| ======================================================== |
41 | 41 | //| |
42 | | -//| A .mp3 file prepped for audio playback. Only mono and stereo files are supported. Samples must |
43 | | -//| be 8 bit unsigned or 16 bit signed. If a buffer is provided, it will be used instead of allocating |
44 | | -//| an internal buffer. |
| 42 | +//| An object that decodes MP3 files for playback on an audio device. |
45 | 43 | //| |
46 | 44 | //| .. class:: MP3(file[, buffer]) |
47 | 45 | //| |
|
63 | 61 | //| speaker_enable.switch_to_output(value=True) |
64 | 62 | //| |
65 | 63 | //| data = open("cplay-16bit-16khz-64kbps.mp3", "rb") |
66 | | -//| mp3 = audiomp3.MP3File(data) |
| 64 | +//| mp3 = audiomp3.MP3Decoder(data) |
67 | 65 | //| a = audioio.AudioOut(board.A0) |
68 | 66 | //| |
69 | 67 | //| print("playing") |
@@ -270,7 +268,7 @@ STATIC const audiosample_p_t audiomp3_mp3file_proto = { |
270 | 268 |
|
271 | 269 | const mp_obj_type_t audiomp3_mp3file_type = { |
272 | 270 | { &mp_type_type }, |
273 | | - .name = MP_QSTR_MP3File, |
| 271 | + .name = MP_QSTR_MP3Decoder, |
274 | 272 | .make_new = audiomp3_mp3file_make_new, |
275 | 273 | .locals_dict = (mp_obj_dict_t*)&audiomp3_mp3file_locals_dict, |
276 | 274 | .protocol = &audiomp3_mp3file_proto, |
|
0 commit comments