You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef GUARD_TAPERINGLY_POSTDEPOSITIONAL_FULL_CIRCLE_FALLS_DUE_8972
|
|
#define GUARD_TAPERINGLY_POSTDEPOSITIONAL_FULL_CIRCLE_FALLS_DUE_8972
|
|
#pragma once
|
|
|
|
#include "dummy_decoder.hpp"
|
|
#include "ffdshow/ffdshow_decoder.hpp"
|
|
#include "freesurround_wrapper.hpp"
|
|
|
|
#include <variant>
|
|
|
|
class Decoder
|
|
{
|
|
public:
|
|
[[nodiscard]] std::span<const float> Decode(
|
|
float rate, std::span<const float> in)
|
|
{ return std::visit([&](auto& x) { return x.Decode(rate, in); }, dec); }
|
|
|
|
void Reset() { std::visit([](auto& x) { x.Reset(); }, dec); }
|
|
[[nodiscard]] unsigned GetBlockSize() const noexcept
|
|
{ return std::visit([](auto& x) { return x.GetBlockSize(); }, dec); }
|
|
|
|
[[nodiscard]] std::vector<Channel::E> GetChannels() const
|
|
{ return std::visit([](auto& x) { return x.GetChannels(); }, dec); }
|
|
|
|
[[nodiscard]] uint32_t GetDelay() const noexcept
|
|
{ return std::visit([](auto& x) { return x.GetDelay(); }, dec); }
|
|
|
|
static void PrintHelp();
|
|
[[nodiscard]] std::vector<struct Option> GetOptions();
|
|
|
|
private:
|
|
std::variant<FreesurroundWrapper, FfdshowDecoder, DummyDecoder> dec;
|
|
};
|
|
|
|
#endif
|