Skip to content

Engine → Audio → voice.h

voice_id

Syntax

struct voice_id

Variables

AccessNameTypeDefaultDescription
publickeycore::slot_key{}

Functions

Public

from_u64

[[nodiscard]] static constexpr voice_id from_u64(
    u64 packed) noexcept;

Inverse of to_u64().

is_valid

[[nodiscard]] constexpr bool is_valid() const noexcept;

True for every id the engine issued; false for the null id.

null

[[nodiscard]] static constexpr voice_id null() noexcept;

The null id. Equivalent to voice_id{}.

to_u64

[[nodiscard]] constexpr u64 to_u64() const noexcept;

Packs the id into one integer (generation in the high 32 bits).

Operator Overloads

Public

operator<=>

[[nodiscard]] constexpr auto operator<=>(
    const voice_id &) const noexcept = default;

operator==

[[nodiscard]] constexpr bool operator==(
    const voice_id &) const noexcept = default;