From 15a1647c5cd6d0499e7ddf3284ff4f6af2344d97 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Mon, 11 Mar 2019 18:30:56 -0500 Subject: [PATCH] fix compilation with updated circuitpy_mpconfig and upstream changes --- py/circuitpy_defns.mk | 1 + shared-bindings/audioio/MixerVoice.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 09d0a93e21..47a720730b 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -296,6 +296,7 @@ $(filter $(SRC_PATTERNS), \ _stage/__init__.c \ audioio/__init__.c \ audioio/Mixer.c \ + audioio/MixerVoice.c \ audioio/RawSample.c \ audioio/WaveFile.c \ bitbangio/I2C.c \ diff --git a/shared-bindings/audioio/MixerVoice.c b/shared-bindings/audioio/MixerVoice.c index 5cddb291cd..2bcafaae01 100644 --- a/shared-bindings/audioio/MixerVoice.c +++ b/shared-bindings/audioio/MixerVoice.c @@ -33,8 +33,8 @@ //| :param int buffer_size: The total size in bytes of the buffers to mix into //| // TODO: support mono or stereo voices -STATIC mp_obj_t audioio_mixervoice_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) { - audioio_mixervoice_obj_t *self = m_new(audioio_mixervoice_obj_t, 1); +STATIC mp_obj_t audioio_mixervoice_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + audioio_mixervoice_obj_t *self = m_new_obj(audioio_mixervoice_obj_t); self->base.type = &audioio_mixervoice_type; self->sample = NULL; self->gain = ((1 << 15)-1); @@ -188,8 +188,7 @@ STATIC MP_DEFINE_CONST_DICT(audioio_mixervoice_locals_dict, audioio_mixervoice_l const mp_obj_type_t audioio_mixervoice_type = { { &mp_type_type }, - .name = MP_QSTR_mixervoice, + .name = MP_QSTR_MixerVoice, .make_new = audioio_mixervoice_make_new, .locals_dict = (mp_obj_dict_t*)&audioio_mixervoice_locals_dict, }; -