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_buffers field.

HostConfig.bufferSize

type: number

Mirrors the anira::HostConfig::m_buffer_size field.

HostConfig.sampleRate

type: number

Mirrors the anira::HostConfig::m_sample_rate field.

HostConfig.tensorIndex

type: number

Mirrors the anira::HostConfig::m_tensor_index field.

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