surroundize

Tool/PipeWire filter to convert stereo audio to surround
git clone https://git.neptards.moe/u3shit/surroundize.git
Log | Files | Refs | README | LICENSE

dummy_decoder.hpp (844B)


      1 #ifndef GUARD_THAIR_POST_OVULATION_INDIAN_SANDALWOOD_SWORDFISHES_2588
      2 #define GUARD_THAIR_POST_OVULATION_INDIAN_SANDALWOOD_SWORDFISHES_2588
      3 #pragma once
      4 
      5 #include "channel.hpp"
      6 #include "options.hpp"
      7 
      8 #include <cstdint>
      9 #include <span>
     10 
     11 class DummyDecoder
     12 {
     13 public:
     14   static constexpr void Init(float) noexcept {}
     15   [[nodiscard]] std::span<const float> Decode(std::span<const float> in)
     16   {
     17     buf.assign(in.begin(), in.end());
     18     return buf;
     19   }
     20 
     21   [[nodiscard]] static constexpr unsigned GetBlockSize() noexcept { return 0; }
     22   [[nodiscard]] static std::vector<Option> GetOptions() { return {}; }
     23 
     24   [[nodiscard]] static std::vector<Channel::E> GetChannels()
     25   { return {Channel::FRONT_LEFT, Channel::FRONT_RIGHT}; }
     26   [[nodiscard]] static constexpr uint32_t GetDelay() noexcept { return 0; }
     27 
     28 private:
     29   std::vector<float> buf;
     30 };
     31 
     32 #endif