diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-04-04 14:12:01 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-04-19 10:29:40 +1000 |
| commit | 7a54ff0df9c18b662e5bdc11ac2e26ff052cfa4d (patch) | |
| tree | a2f456c3c6e41faef168fb39f310df74ac46f4af /src/audio/audio_task.cpp | |
| parent | 40a9734b04c48339cfdf6ed9043aa3f6f0dda62d (diff) | |
| download | tangara-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.cpp | 6 |
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? |
