27 lines
553 B
C
Raw Normal View History

2019-10-26 01:51:40 +02:00
#pragma once
#include <functional>
#include <cstdio>
namespace tc {
namespace audio {
class Reframer {
public:
Reframer(size_t channels, size_t frame_size);
virtual ~Reframer();
void process(const void* /* source */, size_t /* samples */);
inline size_t channels() { return this->_channels; }
inline size_t frame_size() { 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;
};
}
}