From 47ae601d417d0ef99eb6fe433ef695614d8d2786 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 21 Feb 2023 14:40:18 +1100 Subject: Tidy up pipeline and use arena capacity to test for overruns --- src/audio/include/audio_element_handle.hpp | 41 ------------------------------ 1 file changed, 41 deletions(-) delete mode 100644 src/audio/include/audio_element_handle.hpp (limited to 'src/audio/include/audio_element_handle.hpp') diff --git a/src/audio/include/audio_element_handle.hpp b/src/audio/include/audio_element_handle.hpp deleted file mode 100644 index e4d66491..00000000 --- a/src/audio/include/audio_element_handle.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include -#include "audio_element.hpp" - -namespace audio { - -class AudioElementHandle { - public: - AudioElementHandle(std::unique_ptr task, - std::shared_ptr element); - ~AudioElementHandle(); - - auto CurrentState() -> ElementState; - - // TODO: think about this contract. Would it ever make sense to pause and - // then walk away? Things could keep running for a whole loop if data comes - // through, so probably not? - enum PlayPause { - PLAY, - PAUSE, - }; - auto PlayPause(PlayPause state) -> void; - auto Quit() -> void; - - auto PauseSync() -> void; - auto QuitSync() -> void; - - AudioElementHandle(const AudioElementHandle&) = delete; - AudioElementHandle& operator=(const AudioElementHandle&) = delete; - - private: - std::unique_ptr task_; - std::shared_ptr element_; - - auto MonitorUntilState(eTaskState desired) -> void; - auto SetStateAndWakeUp(ElementState state) -> void; - auto WakeUpTask() -> void; -}; - -} // namespace audio -- cgit v1.2.3