@@ -233,11 +233,15 @@ MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_multi_tap_delay_get_playing_obj, audiodela
233
233
MP_PROPERTY_GETTER (audiodelays_multi_tap_delay_playing_obj ,
234
234
(mp_obj_t )& audiodelays_multi_tap_delay_get_playing_obj );
235
235
236
- //| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None :
236
+ //| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> MultiTapDelay :
237
237
//| """Plays the sample once when loop=False and continuously when loop=True.
238
238
//| Does not block. Use `playing` to block.
239
239
//|
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"""
241
245
//| ...
242
246
//|
243
247
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 ) {
@@ -255,7 +259,7 @@ static mp_obj_t audiodelays_multi_tap_delay_obj_play(size_t n_args, const mp_obj
255
259
mp_obj_t sample = args [ARG_sample ].u_obj ;
256
260
common_hal_audiodelays_multi_tap_delay_play (self , sample , args [ARG_loop ].u_bool );
257
261
258
- return mp_const_none ;
262
+ return MP_OBJ_FROM_PTR ( self ) ;
259
263
}
260
264
MP_DEFINE_CONST_FUN_OBJ_KW (audiodelays_multi_tap_delay_play_obj , 1 , audiodelays_multi_tap_delay_obj_play );
261
265
0 commit comments