Class HostConfig#
Note
Construct via the Class AniraWeb factory in most cases:
aniraWeb.HostConfig(...) rather than new HostConfig(...). The
factory threads the WASM instance through for you.
- class HostConfig(wasmInstance, bufferSize, sampleRate, allowSmallerBuffers, tensorIndex)#
TypeScript wrapper for anira::HostConfig Thread-safe C API wrapper
- Extends:
BaseWrapper
- Arguments:
wasmInstance (AniraWasmInstance)
bufferSize (number)
sampleRate (number)
allowSmallerBuffers (boolean)
tensorIndex (number)
- HostConfig.allowSmallerBuffers#
type: boolean
Mirrors the
anira::HostConfig::m_allow_smaller_buffersfield.
- HostConfig.bufferSize#
type: number
Mirrors the
anira::HostConfig::m_buffer_sizefield.
- HostConfig.sampleRate#
type: number
Mirrors the
anira::HostConfig::m_sample_ratefield.
- HostConfig.tensorIndex#
type: number
Mirrors the
anira::HostConfig::m_tensor_indexfield.
- destroy()#
Free the underlying C++ object. See Lifecycle and Cleanup for when to call this.
- equals(other)#
- Arguments:
other (PossiblePointer<HostConfig>)
- Returns:
boolean
- getRelativeBufferSize(inferenceConfig, tensorIndex, input=true)#
Mirrors
anira::HostConfig::get_relative_buffer_size().- Arguments:
inferenceConfig (PossiblePointer<InferenceConfig>)
tensorIndex (number)
input (boolean)
- Returns:
number
- getRelativeSampleRate(inferenceConfig, tensorIndex, input=true)#
Mirrors
anira::HostConfig::get_relative_sample_rate().- Arguments:
inferenceConfig (PossiblePointer<InferenceConfig>)
tensorIndex (number)
input (boolean)
- Returns:
number
- notEquals(other)#
- Arguments:
other (PossiblePointer<HostConfig>)
- Returns:
boolean