Struct anira::v2::HostConfig#
-
struct HostConfig#
The 2.x HostConfig: the host’s block size and sample rate in samples of the reference stream, whether smaller blocks come, and which tensor is the reference stream (k_first_streamable: the first Streamed input, else the first Streamed output). The m_buffer_size may be fractional, as in 2.x (a control-rate model prepared with samplesPerBlock / 2048.f): it becomes the Hard host block as it is, and the host moves a sample of a stream only once a whole one has accumulated (anira_contract_create_hard). The session’s arithmetic of 2.x (resolve_reference, get_reference_size, get_relative_buffer_size, get_relative_sample_rate) is not declared.
Public Functions
-
HostConfig() = default#
-
inline HostConfig(float host_buffer_size, float host_sample_rate, bool allow_smaller_buffers = false, size_t tensor_index = k_first_streamable, bool tensor_is_input = true)#
-
inline bool operator==(const HostConfig &other) const noexcept#
Equal within 1e-6 on the two floats, as in 2.x.
-
inline bool operator!=(const HostConfig &other) const noexcept#
Public Members
-
float m_buffer_size = 0#
the host’s largest block: no call carries more
-
float m_sample_rate = 0#
Hz.
-
bool m_allow_smaller_buffers = false#
blocks below m_buffer_size may come
-
size_t m_tensor_index = k_first_streamable#
the reference tensor’s index
-
bool m_tensor_is_input = true#
the side m_tensor_index counts on
Public Static Attributes
-
static constexpr size_t k_first_streamable = static_cast<size_t>(-1)#
-
HostConfig() = default#