summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorsommersoft <sommersoft@gmail.com>2019-08-25 09:33:23 -0500
committersommersoft <sommersoft@gmail.com>2019-08-25 09:33:23 -0500
commit7f64af38cbd74b417b28e28e706dceb00e42b01b (patch)
tree24783d079aade2373356174b685de80df000d78b /shared-module
parent2e4b687ba56a38a6bb1dbc262a3416f6e7e8982d (diff)
fix 'audiomixer_mixer_reset_buffer'
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/audiomixer/Mixer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/shared-module/audiomixer/Mixer.c b/shared-module/audiomixer/Mixer.c
index 0ae7c7b09..da0f7dedb 100644
--- a/shared-module/audiomixer/Mixer.c
+++ b/shared-module/audiomixer/Mixer.c
@@ -77,7 +77,7 @@ uint32_t common_hal_audiomixer_mixer_get_sample_rate(audiomixer_mixer_obj_t* sel
}
bool common_hal_audiomixer_mixer_get_playing(audiomixer_mixer_obj_t* self) {
- for (int32_t v = 0; v < self->voice_count; v++) {
+ for (uint8_t v = 0; v < self->voice_count; v++) {
if (common_hal_audiomixer_mixervoice_get_playing(MP_OBJ_TO_PTR(self->voice[v]))) {
return true;
}
@@ -88,11 +88,9 @@ bool common_hal_audiomixer_mixer_get_playing(audiomixer_mixer_obj_t* self) {
void audiomixer_mixer_reset_buffer(audiomixer_mixer_obj_t* self,
bool single_channel,
uint8_t channel) {
-#if 0
- for (int32_t i = 0; i < self->voice_count; i++) {
- self->voice[i].sample = NULL;
+ for (uint8_t i = 0; i < self->voice_count; i++) {
+ common_hal_audiomixer_mixervoice_stop(self->voice[i]);
}
-#endif
}
uint32_t add8signed(uint32_t a, uint32_t b) {