@@ -150,7 +150,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_mixer___exit___obj, 4, 4, aud
150
150
//|
151
151
//| Sample must be an `audioio.WaveFile`, `audioio.Mixer` or `audioio.RawSample`.
152
152
//|
153
- //| If other samples are already playing, the encodings must match .
153
+ //| The sample must match the Mixer's encoding settings given in the constructor .
154
154
//|
155
155
STATIC mp_obj_t audioio_mixer_obj_play (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
156
156
enum { ARG_sample , ARG_voice , ARG_loop };
@@ -171,24 +171,24 @@ STATIC mp_obj_t audioio_mixer_obj_play(size_t n_args, const mp_obj_t *pos_args,
171
171
}
172
172
MP_DEFINE_CONST_FUN_OBJ_KW (audioio_mixer_play_obj , 1 , audioio_mixer_obj_play );
173
173
174
- //| .. method:: stop (voice=0)
174
+ //| .. method:: stop_voice (voice=0)
175
175
//|
176
- //| Stops playback and resets to the start of the sample on the given channel .
176
+ //| Stops playback of the sample on the given voice .
177
177
//|
178
- STATIC mp_obj_t audioio_mixer_obj_stop (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
178
+ STATIC mp_obj_t audioio_mixer_obj_stop_voice (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
179
179
enum { ARG_voice };
180
180
static const mp_arg_t allowed_args [] = {
181
- { MP_QSTR_voice , MP_ARG_INT | MP_ARG_KW_ONLY , {.u_int = 0 } },
181
+ { MP_QSTR_voice , MP_ARG_INT , {.u_int = 0 } },
182
182
};
183
183
audioio_mixer_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
184
184
raise_error_if_deinited (common_hal_audioio_mixer_deinited (self ));
185
185
mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
186
186
mp_arg_parse_all (n_args - 1 , pos_args + 1 , kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , args );
187
187
188
- common_hal_audioio_mixer_stop (self , args [ARG_voice ].u_int );
188
+ common_hal_audioio_mixer_stop_voice (self , args [ARG_voice ].u_int );
189
189
return mp_const_none ;
190
190
}
191
- MP_DEFINE_CONST_FUN_OBJ_KW (audioio_mixer_stop_obj , 1 , audioio_mixer_obj_stop );
191
+ MP_DEFINE_CONST_FUN_OBJ_KW (audioio_mixer_stop_voice_obj , 1 , audioio_mixer_obj_stop_voice );
192
192
193
193
//| .. attribute:: playing
194
194
//|
@@ -233,7 +233,7 @@ STATIC const mp_rom_map_elem_t audioio_mixer_locals_dict_table[] = {
233
233
{ MP_ROM_QSTR (MP_QSTR___enter__ ), MP_ROM_PTR (& default___enter___obj ) },
234
234
{ MP_ROM_QSTR (MP_QSTR___exit__ ), MP_ROM_PTR (& audioio_mixer___exit___obj ) },
235
235
{ MP_ROM_QSTR (MP_QSTR_play ), MP_ROM_PTR (& audioio_mixer_play_obj ) },
236
- { MP_ROM_QSTR (MP_QSTR_stop ), MP_ROM_PTR (& audioio_mixer_stop_obj ) },
236
+ { MP_ROM_QSTR (MP_QSTR_stop_voice ), MP_ROM_PTR (& audioio_mixer_stop_voice_obj ) },
237
237
238
238
// Properties
239
239
{ MP_ROM_QSTR (MP_QSTR_playing ), MP_ROM_PTR (& audioio_mixer_playing_obj ) },
0 commit comments