25 lines
687 B
C++
25 lines
687 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <cstdio>
|
|
|
|
namespace tc::audio {
|
|
class InputReframer {
|
|
public:
|
|
InputReframer(size_t channels, size_t frame_size);
|
|
virtual ~InputReframer();
|
|
|
|
void process(const void* /* source */, size_t /* samples */);
|
|
|
|
[[nodiscard]] inline size_t channels() const { return this->_channels; }
|
|
[[nodiscard]] inline size_t frame_size() const { return this->_frame_size; }
|
|
|
|
std::function<void(const void* /* buffer */)> on_frame;
|
|
private:
|
|
void* buffer;
|
|
size_t _buffer_index;
|
|
|
|
size_t _channels;
|
|
size_t _frame_size;
|
|
};
|
|
} |