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.
41 lines
974 B
C++
41 lines
974 B
C++
#ifndef GUARD_CLOAKEDLY_AVERAGE_SUMMER_GRAYS_OUT_2241
|
|
#define GUARD_CLOAKEDLY_AVERAGE_SUMMER_GRAYS_OUT_2241
|
|
#pragma once
|
|
|
|
#include "channel.hpp"
|
|
#include "freesurround/freesurround_decoder.h"
|
|
#include "options.hpp"
|
|
|
|
#include <cstdint>
|
|
#include <span>
|
|
|
|
class FreesurroundWrapper
|
|
{
|
|
public:
|
|
FreesurroundWrapper();
|
|
|
|
void Reset() { dec.flush(); }
|
|
|
|
[[nodiscard]] unsigned GetBlockSize() const noexcept { return block_size; }
|
|
[[nodiscard]] std::vector<Option> GetOptions();
|
|
|
|
[[nodiscard]] std::span<const float> Decode(
|
|
float rate, std::span<const float> in);
|
|
|
|
[[nodiscard]] std::vector<Channel::E> GetChannels() const;
|
|
[[nodiscard]] std::uint32_t GetDelay() const noexcept { return block_size / 2; }
|
|
|
|
private:
|
|
void Recreate();
|
|
freesurround_decoder dec;
|
|
|
|
channel_setup channel_setup;
|
|
unsigned block_size;
|
|
float circular_wrap, shift, depth, focus;
|
|
float front_separation, rear_separation;
|
|
bool enable_lfe;
|
|
float low_cutoff, high_cutoff;
|
|
};
|
|
|
|
#endif
|