From e5fb1759b16d2c99487acc4fb0a2711afa3aa1dc Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 24 Jan 2023 16:39:52 +1100 Subject: Add a bunch of logging from playback stream investigatons --- src/audio/include/audio_element.hpp | 4 +++- src/audio/include/audio_element_handle.hpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/audio/include') diff --git a/src/audio/include/audio_element.hpp b/src/audio/include/audio_element.hpp index ec6d6e80..eb700180 100644 --- a/src/audio/include/audio_element.hpp +++ b/src/audio/include/audio_element.hpp @@ -32,6 +32,8 @@ enum AudioProcessingError { UNSUPPORTED_STREAM, // Indicates an error with reading or writing stream data. IO_ERROR, + // Indicates that the element has run out of data to process. + OUT_OF_DATA, }; /* @@ -65,7 +67,7 @@ class IAudioElement { * to ProcessIdle(). If this is portMAX_DELAY (the default), then ProcessIdle * will never be called. */ - virtual auto IdleTimeout() const -> TickType_t { return portMAX_DELAY; } + virtual auto IdleTimeout() const -> TickType_t { return 10; } virtual auto InputMinChunkSize() const -> std::size_t { return 0; } diff --git a/src/audio/include/audio_element_handle.hpp b/src/audio/include/audio_element_handle.hpp index adb26baa..e4d66491 100644 --- a/src/audio/include/audio_element_handle.hpp +++ b/src/audio/include/audio_element_handle.hpp @@ -33,7 +33,7 @@ class AudioElementHandle { std::unique_ptr task_; std::shared_ptr element_; - auto MonitorUtilState(eTaskState desired) -> void; + auto MonitorUntilState(eTaskState desired) -> void; auto SetStateAndWakeUp(ElementState state) -> void; auto WakeUpTask() -> void; }; -- cgit v1.2.3