diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-16 10:57:55 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-16 10:57:55 +1000 |
| commit | 4e27de21e49900963ffa61cc9c0a676bb028f992 (patch) | |
| tree | 8123994d33bc2ff8b5d58a38155b53e401669ae8 /src/audio/pipeline.cpp | |
| parent | 62dce8d9fcc139ca6dc2041c86723d19faab304f (diff) | |
| download | tangara-fw-4e27de21e49900963ffa61cc9c0a676bb028f992.tar.gz | |
clean up a bunch of obselete audio code
Diffstat (limited to 'src/audio/pipeline.cpp')
| -rw-r--r-- | src/audio/pipeline.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/audio/pipeline.cpp b/src/audio/pipeline.cpp deleted file mode 100644 index f54f8d11..00000000 --- a/src/audio/pipeline.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2023 jacqueline <me@jacqueline.id.au> - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#include "pipeline.hpp" -#include <algorithm> -#include <memory> -#include "stream_info.hpp" - -namespace audio { - -Pipeline::Pipeline(IAudioElement* output) : root_(output), subtrees_() { - assert(output != nullptr); -} - -Pipeline::~Pipeline() {} - -auto Pipeline::AddInput(IAudioElement* input) -> Pipeline* { - subtrees_.push_back(std::make_unique<Pipeline>(input)); - return subtrees_.back().get(); -} - -auto Pipeline::OutputElement() const -> IAudioElement* { - return root_; -} - -auto Pipeline::NumInputs() const -> std::size_t { - return subtrees_.size(); -} - -auto Pipeline::InStreams(std::vector<RawStream>* out) -> void { - for (int i = 0; i < subtrees_.size(); i++) { - out->push_back(subtrees_[i]->OutStream()); - } -} - -auto Pipeline::OutStream() -> RawStream { - return {&output_info_, output_buffer_}; -} - -auto Pipeline::GetIterationOrder() -> std::vector<Pipeline*> { - std::vector<Pipeline*> to_search{this}; - std::vector<Pipeline*> found; - - while (!to_search.empty()) { - Pipeline* current = to_search.back(); - to_search.pop_back(); - found.push_back(current); - - for (const auto& i : current->subtrees_) { - to_search.push_back(i.get()); - } - } - - std::reverse(found.begin(), found.end()); - return found; -} - -} // namespace audio |
