summaryrefslogtreecommitdiff
path: root/shared-module/audioio/RawSample.h
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-06-14 18:47:40 -0400
committerDan Halbert <halbert@halwitz.org>2018-06-14 18:47:40 -0400
commite724bc1c4eb1224aa043a1489b29ec3daaa832aa (patch)
treeaa72de23055ef2fb3eae33d11e1fc5536a5eb05c /shared-module/audioio/RawSample.h
parent618943d90a958d36d9b0e2206552100069b10ddb (diff)
Fix playing audio from SD card
Diffstat (limited to 'shared-module/audioio/RawSample.h')
-rw-r--r--shared-module/audioio/RawSample.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/shared-module/audioio/RawSample.h b/shared-module/audioio/RawSample.h
index 1604a1725..fe5283db4 100644
--- a/shared-module/audioio/RawSample.h
+++ b/shared-module/audioio/RawSample.h
@@ -29,6 +29,8 @@
#include "py/obj.h"
+#include "shared-module/audioio/__init__.h"
+
typedef struct {
mp_obj_base_t base;
uint8_t* buffer;
@@ -45,11 +47,11 @@ typedef struct {
void audioio_rawsample_reset_buffer(audioio_rawsample_obj_t* self,
bool single_channel,
uint8_t channel);
-bool audioio_rawsample_get_buffer(audioio_rawsample_obj_t* self,
- bool single_channel,
- uint8_t channel,
- uint8_t** buffer,
- uint32_t* buffer_length); // length in bytes
+audioio_get_buffer_result_t audioio_rawsample_get_buffer(audioio_rawsample_obj_t* self,
+ bool single_channel,
+ uint8_t channel,
+ uint8_t** buffer,
+ uint32_t* buffer_length); // length in bytes
void audioio_rawsample_get_buffer_structure(audioio_rawsample_obj_t* self, bool single_channel,
bool* single_buffer, bool* samples_signed,
uint32_t* max_buffer_length, uint8_t* spacing);