diff options
Diffstat (limited to 'src/audio/audio_task.cpp')
| -rw-r--r-- | src/audio/audio_task.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/audio/audio_task.cpp b/src/audio/audio_task.cpp index 464879d8..3a2a5941 100644 --- a/src/audio/audio_task.cpp +++ b/src/audio/audio_task.cpp @@ -124,7 +124,7 @@ void AudioTaskMain(void* args) { RawStream raw_sink_stream = elements.front()->OutStream(&out_region); InputStream sink_stream(&raw_sink_stream); - if (sink_stream.data().size_bytes() == 0) { + if (sink_stream.info().bytes_in_stream == 0) { out_region.Unmap(); vTaskDelay(pdMS_TO_TICKS(100)); continue; @@ -143,7 +143,8 @@ 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 && !std::holds_alternative<std::monostate>(*output_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? @@ -160,7 +161,7 @@ void AudioTaskMain(void* args) { vTaskDelete(NULL); } -static std::byte sDrainBuf[1024]; +static std::byte sDrainBuf[8 * 1024]; void AudioDrainMain(void* args) { { |
