diff options
| author | dherrada <dylan.herrada@adafruit.com> | 2020-07-02 12:00:40 -0400 |
|---|---|---|
| committer | dherrada <dylan.herrada@adafruit.com> | 2020-07-02 12:02:21 -0400 |
| commit | e114b31a7ab8a75dac542bdab0d4d1fb64246a06 (patch) | |
| tree | 280ecd34367b2ca4ce93d1056b4688823ea15fab | |
| parent | 24bca06db00ed032f645d69534b42625c9772776 (diff) | |
Added type hints to audiomp3
| -rw-r--r-- | shared-bindings/audiomp3/MP3Decoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/shared-bindings/audiomp3/MP3Decoder.c b/shared-bindings/audiomp3/MP3Decoder.c index e6d48e32c..4d4792cdc 100644 --- a/shared-bindings/audiomp3/MP3Decoder.c +++ b/shared-bindings/audiomp3/MP3Decoder.c @@ -89,7 +89,7 @@ STATIC mp_obj_t audiomp3_mp3file_make_new(const mp_obj_type_t *type, size_t n_ar return MP_OBJ_FROM_PTR(self); } -//| def deinit(self, ) -> Any: +//| def deinit(self, ) -> None: //| """Deinitialises the MP3 and releases all memory resources for reuse.""" //| ... //| @@ -106,13 +106,13 @@ STATIC void check_for_deinit(audiomp3_mp3file_obj_t *self) { } } -//| def __enter__(self, ) -> Any: +//| def __enter__(self, ) -> MP3: //| """No-op used by Context Managers.""" //| ... //| // Provided by context manager helper. -//| def __exit__(self, ) -> Any: +//| def __exit__(self, ) -> None: //| """Automatically deinitializes the hardware when exiting a context. See //| :ref:`lifetime-and-contextmanagers` for more info.""" //| ... @@ -124,7 +124,7 @@ STATIC mp_obj_t audiomp3_mp3file_obj___exit__(size_t n_args, const mp_obj_t *arg } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiomp3_mp3file___exit___obj, 4, 4, audiomp3_mp3file_obj___exit__); -//| file: Any = ... +//| file: Optional[file] = ... //| """File to play back.""" //| STATIC mp_obj_t audiomp3_mp3file_obj_get_file(mp_obj_t self_in) { @@ -154,7 +154,7 @@ const mp_obj_property_t audiomp3_mp3file_file_obj = { -//| sample_rate: Any = ... +//| sample_rate: Optional[int] = ... //| """32 bit value that dictates how quickly samples are loaded into the DAC //| in Hertz (cycles per second). When the sample is looped, this can change //| the pitch output without changing the underlying sample.""" @@ -181,7 +181,7 @@ const mp_obj_property_t audiomp3_mp3file_sample_rate_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| bits_per_sample: Any = ... +//| bits_per_sample: int = ... //| """Bits per sample. (read only)""" //| STATIC mp_obj_t audiomp3_mp3file_obj_get_bits_per_sample(mp_obj_t self_in) { @@ -198,7 +198,7 @@ const mp_obj_property_t audiomp3_mp3file_bits_per_sample_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| channel_count: Any = ... +//| channel_count: int = ... //| """Number of audio channels. (read only)""" //| STATIC mp_obj_t audiomp3_mp3file_obj_get_channel_count(mp_obj_t self_in) { @@ -215,7 +215,7 @@ const mp_obj_property_t audiomp3_mp3file_channel_count_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| rms_level: Any = ... +//| rms_level: float = ... //| """The RMS audio level of a recently played moment of audio. (read only)""" //| STATIC mp_obj_t audiomp3_mp3file_obj_get_rms_level(mp_obj_t self_in) { |
