summaryrefslogtreecommitdiff
path: root/src/audio/audio_element.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-01-27 13:28:22 +1100
committerjacqueline <me@jacqueline.id.au>2023-01-27 13:28:22 +1100
commit2cc0a38a1ac7fc54d7333dafa8b99479a7f5dc86 (patch)
tree491921af1c26c2712d91030068ac29c4cb2d6d51 /src/audio/audio_element.cpp
parent7b60f5f864997e94895305f23ed2716ad7d9acaa (diff)
downloadtangara-fw-2cc0a38a1ac7fc54d7333dafa8b99479a7f5dc86.tar.gz
pipeline memory management fixes + logging
Diffstat (limited to 'src/audio/audio_element.cpp')
-rw-r--r--src/audio/audio_element.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio/audio_element.cpp b/src/audio/audio_element.cpp
index e1623c36..90d62e76 100644
--- a/src/audio/audio_element.cpp
+++ b/src/audio/audio_element.cpp
@@ -3,7 +3,7 @@
namespace audio {
IAudioElement::IAudioElement()
- : input_events_(xQueueCreate(kEventQueueSize, sizeof(StreamEvent))),
+ : input_events_(xQueueCreate(kEventQueueSize, sizeof(void*))),
output_events_(nullptr),
unprocessed_output_chunks_(0),
buffered_output_(),
@@ -37,7 +37,7 @@ auto IAudioElement::SendOrBufferEvent(std::unique_ptr<StreamEvent> event)
return false;
}
StreamEvent* raw_event = event.release();
- if (!xQueueSend(output_events_, raw_event, 0)) {
+ if (!xQueueSend(output_events_, &raw_event, 0)) {
buffered_output_.emplace_front(raw_event);
return false;
}
@@ -48,7 +48,7 @@ auto IAudioElement::FlushBufferedOutput() -> bool {
while (!buffered_output_.empty()) {
StreamEvent* raw_event = buffered_output_.front().release();
buffered_output_.pop_front();
- if (!xQueueSend(output_events_, raw_event, 0)) {
+ if (!xQueueSend(output_events_, &raw_event, 0)) {
buffered_output_.emplace_front(raw_event);
return false;
}