summaryrefslogtreecommitdiff
path: root/src/audio/audio_task.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-04-04 14:12:01 +1000
committerjacqueline <me@jacqueline.id.au>2023-04-19 10:29:40 +1000
commit7a54ff0df9c18b662e5bdc11ac2e26ff052cfa4d (patch)
treea2f456c3c6e41faef168fb39f310df74ac46f4af /src/audio/audio_task.cpp
parent40a9734b04c48339cfdf6ed9043aa3f6f0dda62d (diff)
downloadtangara-fw-7a54ff0df9c18b662e5bdc11ac2e26ff052cfa4d.tar.gz
WIP track down new pipeline memory issues
Diffstat (limited to 'src/audio/audio_task.cpp')
-rw-r--r--src/audio/audio_task.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/audio/audio_task.cpp b/src/audio/audio_task.cpp
index babe0a97..464879d8 100644
--- a/src/audio/audio_task.cpp
+++ b/src/audio/audio_task.cpp
@@ -130,9 +130,7 @@ void AudioTaskMain(void* args) {
continue;
}
- if ((!output_format || output_format != sink_stream.info().format) &&
- !std::holds_alternative<std::monostate>(
- sink_stream.info().format)) {
+ if (!output_format || output_format != sink_stream.info().format) {
// The format of the stream within the sink stream has changed. We
// need to reconfigure the sink, but shouldn't do so until we've fully
// drained the current buffer.
@@ -145,7 +143,7 @@ void AudioTaskMain(void* args) {
// We've reconfigured the sink, or it was already configured correctly.
// Send through some data.
- if (output_format == sink_stream.info().format) {
+ if (output_format == sink_stream.info().format && !std::holds_alternative<std::monostate>(*output_format)) {
// TODO: tune the delay on this, as it's currently the only way to
// throttle this task's CPU time. Maybe also hold off on the pipeline
// if the buffer is already close to full?