8#include <entt/locator/locator.hpp>
19 auto& lua = entt::locator<sol::state>::value();
21 auto rb_type = lua.new_usertype<
mem::RingBuffer>(
"Ringbuffer", sol::constructors<mem::RingBuffer(const int)>());
Memory manager in a ring buffer format.
int read(float *data, int count) noexcept
Read data from buffer.
int write(float *data, const int count) noexcept
Write data to ring buffer.
void set_volume(const float volume) noexcept
Sets audio volume of the buffer.
int available_bytes() const noexcept
Available bytes left in the ring buffer.
float get_volume() const noexcept
Gets current buffer volume.
float * direct_read_pointer(const int count) noexcept
Read the ring buffer.
void inject_mem()
Inject custom memory stuff into Lua.