summaryrefslogtreecommitdiff
path: root/shared-bindings/audiocore/WaveFile.c
diff options
context:
space:
mode:
authordherrada <dylan.herrada@adafruit.com>2020-07-02 11:37:24 -0400
committerdherrada <dylan.herrada@adafruit.com>2020-07-02 12:02:02 -0400
commitb26ee6c1f666598bf3dd2bd66414916e3d7fe79f (patch)
tree2d2dcbde2f1dafcc308a25a0ccf706c602715456 /shared-bindings/audiocore/WaveFile.c
parent2681bd52b5ec3834024d8b189335315ea4cab7fc (diff)
Added type hints to audiocore
Diffstat (limited to 'shared-bindings/audiocore/WaveFile.c')
-rw-r--r--shared-bindings/audiocore/WaveFile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c
index a067f6cda..6f7d27005 100644
--- a/shared-bindings/audiocore/WaveFile.c
+++ b/shared-bindings/audiocore/WaveFile.c
@@ -91,7 +91,7 @@ STATIC mp_obj_t audioio_wavefile_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 WaveFile and releases all memory resources for reuse."""
//| ...
STATIC mp_obj_t audioio_wavefile_deinit(mp_obj_t self_in) {
@@ -107,13 +107,13 @@ STATIC void check_for_deinit(audioio_wavefile_obj_t *self) {
}
}
-//| def __enter__(self, ) -> Any:
+//| def __enter__(self, ) -> WaveFile:
//| """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."""
//| ...
@@ -125,7 +125,7 @@ STATIC mp_obj_t audioio_wavefile_obj___exit__(size_t n_args, const mp_obj_t *arg
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_wavefile___exit___obj, 4, 4, audioio_wavefile_obj___exit__);
-//| 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."""
@@ -152,7 +152,7 @@ const mp_obj_property_t audioio_wavefile_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 audioio_wavefile_obj_get_bits_per_sample(mp_obj_t self_in) {
@@ -168,7 +168,7 @@ const mp_obj_property_t audioio_wavefile_bits_per_sample_obj = {
(mp_obj_t)&mp_const_none_obj,
(mp_obj_t)&mp_const_none_obj},
};
-//| channel_count: Any = ...
+//| channel_count: int = ...
//| """Number of audio channels. (read only)"""
//|
STATIC mp_obj_t audioio_wavefile_obj_get_channel_count(mp_obj_t self_in) {