Skip to content

Commit 7342090

Browse files
committed
Add return type documentation
1 parent 2e6dbaf commit 7342090

File tree

9 files changed

+45
-9
lines changed

9 files changed

+45
-9
lines changed

shared-bindings/audiodelays/Chorus.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ MP_PROPERTY_GETTER(audiodelays_chorus_playing_obj,
210210
//| """Plays the sample once when loop=False and continuously when loop=True.
211211
//| Does not block. Use `playing` to block.
212212
//|
213-
//| The sample must match the encoding settings given in the constructor."""
213+
//| The sample must match the encoding settings given in the constructor.
214+
//|
215+
//| :return: The effect object itself. Can be used for chaining, ie:
216+
//| ``audio.play(effect.play(sample))``.
217+
//| :rtype: Chorus"""
214218
//| ...
215219
//|
216220
static mp_obj_t audiodelays_chorus_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiodelays/Echo.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ MP_PROPERTY_GETTER(audiodelays_echo_playing_obj,
234234
//| """Plays the sample once when loop=False and continuously when loop=True.
235235
//| Does not block. Use `playing` to block.
236236
//|
237-
//| The sample must match the encoding settings given in the constructor."""
237+
//| The sample must match the encoding settings given in the constructor.
238+
//|
239+
//| :return: The effect object itself. Can be used for chaining, ie:
240+
//| ``audio.play(effect.play(sample))``.
241+
//| :rtype: Echo"""
238242
//| ...
239243
//|
240244
static mp_obj_t audiodelays_echo_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiodelays/MultiTapDelay.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ MP_PROPERTY_GETTER(audiodelays_multi_tap_delay_playing_obj,
237237
//| """Plays the sample once when loop=False and continuously when loop=True.
238238
//| Does not block. Use `playing` to block.
239239
//|
240-
//| The sample must match the encoding settings given in the constructor."""
240+
//| The sample must match the encoding settings given in the constructor.
241+
//|
242+
//| :return: The effect object itself. Can be used for chaining, ie:
243+
//| ``audio.play(effect.play(sample))``.
244+
//| :rtype: MultiTapDelay"""
241245
//| ...
242246
//|
243247
static mp_obj_t audiodelays_multi_tap_delay_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiodelays/PitchShift.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ MP_PROPERTY_GETTER(audiodelays_pitch_shift_playing_obj,
194194
//| """Plays the sample once when loop=False and continuously when loop=True.
195195
//| Does not block. Use `playing` to block.
196196
//|
197-
//| The sample must match the encoding settings given in the constructor."""
197+
//| The sample must match the encoding settings given in the constructor.
198+
//|
199+
//| :return: The effect object itself. Can be used for chaining, ie:
200+
//| ``audio.play(effect.play(sample))``.
201+
//| :rtype: PitchShift"""
198202
//| ...
199203
//|
200204
static mp_obj_t audiodelays_pitch_shift_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiofilters/Distortion.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,11 @@ MP_PROPERTY_GETTER(audiofilters_distortion_playing_obj,
313313
//| """Plays the sample once when loop=False and continuously when loop=True.
314314
//| Does not block. Use `playing` to block.
315315
//|
316-
//| The sample must match the encoding settings given in the constructor."""
316+
//| The sample must match the encoding settings given in the constructor.
317+
//|
318+
//| :return: The effect object itself. Can be used for chaining, ie:
319+
//| ``audio.play(effect.play(sample))``.
320+
//| :rtype: Distortion"""
317321
//| ...
318322
//|
319323
static mp_obj_t audiofilters_distortion_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiofilters/Filter.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ MP_PROPERTY_GETTER(audiofilters_filter_playing_obj,
183183
//| """Plays the sample once when loop=False and continuously when loop=True.
184184
//| Does not block. Use `playing` to block.
185185
//|
186-
//| The sample must match the encoding settings given in the constructor."""
186+
//| The sample must match the encoding settings given in the constructor.
187+
//|
188+
//| :return: The effect object itself. Can be used for chaining, ie:
189+
//| ``audio.play(effect.play(sample))``.
190+
//| :rtype: Filter"""
187191
//| ...
188192
//|
189193
static mp_obj_t audiofilters_filter_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiofilters/Phaser.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ MP_PROPERTY_GETTER(audiofilters_phaser_playing_obj,
218218
//| """Plays the sample once when loop=False and continuously when loop=True.
219219
//| Does not block. Use `playing` to block.
220220
//|
221-
//| The sample must match the encoding settings given in the constructor."""
221+
//| The sample must match the encoding settings given in the constructor.
222+
//|
223+
//| :return: The effect object itself. Can be used for chaining, ie:
224+
//| ``audio.play(effect.play(sample))``.
225+
//| :rtype: Phaser"""
222226
//| ...
223227
//|
224228
static mp_obj_t audiofilters_phaser_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiofreeverb/Freeverb.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ MP_PROPERTY_GETTER(audiofreeverb_freeverb_playing_obj,
200200
//| """Plays the sample once when loop=False and continuously when loop=True.
201201
//| Does not block. Use `playing` to block.
202202
//|
203-
//| The sample must match the encoding settings given in the constructor."""
203+
//| The sample must match the encoding settings given in the constructor.
204+
//|
205+
//| :return: The effect object itself. Can be used for chaining, ie:
206+
//| ``audio.play(effect.play(sample))``.
207+
//| :rtype: Freeverb"""
204208
//| ...
205209
//|
206210
static mp_obj_t audiofreeverb_freeverb_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

shared-bindings/audiomixer/Mixer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ MP_PROPERTY_GETTER(audiomixer_mixer_voice_obj,
166166
//|
167167
//| Sample must be an `audiocore.WaveFile`, `audiocore.RawSample`, `audiomixer.Mixer` or `audiomp3.MP3Decoder`.
168168
//|
169-
//| The sample must match the Mixer's encoding settings given in the constructor."""
169+
//| The sample must match the Mixer's encoding settings given in the constructor.
170+
//|
171+
//| :return: The mixer object itself. Can be used for chaining, ie:
172+
//| ``audio.play(mixer.play(sample))``.
173+
//| :rtype: Chorus"""
170174
//| ...
171175
//|
172176
static mp_obj_t audiomixer_mixer_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {

0 commit comments

Comments
 (0)