summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/audiocore/__init__.c2
-rw-r--r--shared-module/audiocore/__init__.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/shared-module/audiocore/__init__.c b/shared-module/audiocore/__init__.c
index 1553dbe96..ac9d41b60 100644
--- a/shared-module/audiocore/__init__.c
+++ b/shared-module/audiocore/__init__.c
@@ -52,7 +52,7 @@ uint8_t audiosample_channel_count(mp_obj_t sample_obj) {
void audiosample_reset_buffer(mp_obj_t sample_obj, bool single_channel, uint8_t audio_channel) {
const audiosample_p_t *proto = mp_proto_get_or_throw(MP_QSTR_protocol_audiosample, sample_obj);
- proto->reset_buffer(MP_OBJ_TO_PTR(sample_obj));
+ proto->reset_buffer(MP_OBJ_TO_PTR(sample_obj), single_channel, audio_channel);
}
audioio_get_buffer_result_t audiosample_get_buffer(mp_obj_t sample_obj,
diff --git a/shared-module/audiocore/__init__.h b/shared-module/audiocore/__init__.h
index 38c1f5aeb..7a56454b8 100644
--- a/shared-module/audiocore/__init__.h
+++ b/shared-module/audiocore/__init__.h
@@ -42,7 +42,8 @@ typedef enum {
typedef uint32_t (*audiosample_sample_rate_fun)(mp_obj_t);
typedef uint8_t (*audiosample_bits_per_sample_fun)(mp_obj_t);
typedef uint8_t (*audiosample_channel_count_fun)(mp_obj_t);
-typedef void (*audiosample_reset_buffer_fun)(mp_obj_t);
+typedef void (*audiosample_reset_buffer_fun)(mp_obj_t,
+ bool single_channel, uint8_t audio_channel);
typedef audioio_get_buffer_result_t (*audiosample_get_buffer_fun)(mp_obj_t,
bool single_channel, uint8_t channel, uint8_t** buffer,
uint32_t* buffer_length);