From 2cc0a38a1ac7fc54d7333dafa8b99479a7f5dc86 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 27 Jan 2023 13:28:22 +1100 Subject: pipeline memory management fixes + logging --- src/audio/audio_element.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/audio/audio_element.cpp') 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 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; } -- cgit v1.2.3