@@ -233,11 +233,15 @@ MP_DEFINE_CONST_FUN_OBJ_1(audiodelays_multi_tap_delay_get_playing_obj, audiodela
233233MP_PROPERTY_GETTER (audiodelays_multi_tap_delay_playing_obj ,
234234 (mp_obj_t )& audiodelays_multi_tap_delay_get_playing_obj );
235235
236- //| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None :
236+ //| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> MultiTapDelay :
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//|
243247static 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
255259 mp_obj_t sample = args [ARG_sample ].u_obj ;
256260 common_hal_audiodelays_multi_tap_delay_play (self , sample , args [ARG_loop ].u_bool );
257261
258- return mp_const_none ;
262+ return MP_OBJ_FROM_PTR ( self ) ;
259263}
260264MP_DEFINE_CONST_FUN_OBJ_KW (audiodelays_multi_tap_delay_play_obj , 1 , audiodelays_multi_tap_delay_obj_play );
261265
0 commit comments