Skip to content

Namespace dalia

Namespace List > dalia

Classes

Type Name
struct BiquadParams
Configuration parameters for a biquadratic IIR filter.
struct EffectHandle
Handle used to manage effect instances. This handle expires once the effect it is referencing has been destroyed.
class Engine
The central interface and lifetime manager for the DALIA audio engine.
struct EngineConfig
Configuration containing all user-exposed engine settings.
struct Listener3DAttributes
A snapshot of a listener's 3D state in the world.
struct OutputDeviceInfo
Contains metadata for an audio output device.
struct PlaybackHandle
Handle used to manage playback instances. This handle will expire once the playback instance it is referencing stops.
struct SoundHandle
Handle used to manage loaded sounds. This handle expires once the sound it is referencing is unloaded.
struct Vec3
Standard 3D vector for the DALIA API.

Public Types

Type Name
typedef std::function< void(uint32_t requestId, Result result)> AssetLoadCallback
Defines the signature for asset load callbacks.
enum uint8_t AttenuationCurve
Curve used to calculate distance attenuation.
enum uint8_t CoordinateSystem
Defines the mathematical handedness of the host engine's 3D world space.
enum uint8_t DistanceMode
Mode used to determine what listener position to use when calculating distance attenuation.
enum uint8_t EffectType
Defines the available DSP effect algorithms.
typedef uint32_t ListenerMask
Routing mask used to target a specific listener. Can be combined to target multiple listeners using bitwise OR.
typedef std::function< void(LogLevel level, const char *context, const char *message)> LogCallback
Defines the signature for custom logging sinks.
enum int LogLevel
The level at which the DALIA audio engine should produce log messages.
typedef std::function< void(PlaybackHandle playback, PlaybackExitCondition exitCondition)> PlaybackExitCallback
Defines the signature for playback instance termination callbacks.
enum uint8_t PlaybackExitCondition
The condition under which a playback instance was stopped.
enum int Result
Return codes for the DALIA API.
enum uint8_t SoundType
Specifies the memory management and playback strategy for an audio asset.

Public Attributes

Type Name
constexpr uint32_t INVALID_REQUEST_ID = 0
Sentinel value indicating a failed async request.
constexpr EffectHandle InvalidEffectHandle = {}
constexpr PlaybackHandle InvalidPlaybackHandle = {}
Sentinel value representing an invalid playback instance.
constexpr ListenerMask MASK_ALL_LISTENERS = 0xFFFFFFFF
Targets all listeners.
constexpr ListenerMask MASK_LISTENER_0 = 0b00000001
Targets listener 0.
constexpr ListenerMask MASK_LISTENER_1 = 0b00000010
Targets listener 1.
constexpr ListenerMask MASK_LISTENER_2 = 0b00000100
Targets listener 2.
constexpr ListenerMask MASK_LISTENER_3 = 0b00001000
Targets listener 3.
constexpr ListenerMask MASK_NONE = 0b00000000
Targets none of the listeners (silent if spatial).
constexpr size_t MAX_STR_LEN_ASSET_PATH = 256
The maximum string length (including null-terminator) of a filepath.
constexpr size_t MAX_STR_LEN_DEVICE = 256
The maximum string length (including null-terminator) for device names and identifiers.

Public Functions

Type Name
constexpr const char * GetResultString (const Result result)
Converts a Result code into a readable string literal.
constexpr Listener3DAttributes MakeListener3DAttributes (const Vec3 & position, const Vec3 & forward, const Vec3 & up, const Vec3 & velocity)
Constructs a listener transform for a listener that performs panning and attenuation logic from the same world position.
constexpr Listener3DAttributes MakeListener3DAttributesSplit (const Vec3 & position, const Vec3 & probePosition, const Vec3 & forward, const Vec3 & up, const Vec3 & velocity)
Constructs a listener transform for a listener that performs panning and attenuation logic from two separate positions.
constexpr ListenerMask MakeListenerMask (uint32_t listenerIndex)
Creates a routing mask targeting a specific listener.

Public Types Documentation

typedef AssetLoadCallback

Defines the signature for asset load callbacks.

using dalia::AssetLoadCallback = typedef std::function<void(uint32_t requestId, Result result)>;

If provided when requesting an asset load, this function executes when the asynchronous load completes. This happens regardless if the load operation has succeeded or failed. Make sure to check the populated result code.

Parameters:

  • requestId The (optionally provided) identifier populated by the engine when the load was requested.
  • result The outcome of the load operation.

enum AttenuationCurve

Curve used to calculate distance attenuation.

enum dalia::AttenuationCurve {
    InverseSquare,
    Linear,
    Quadratic
};


enum CoordinateSystem

Defines the mathematical handedness of the host engine's 3D world space.

enum dalia::CoordinateSystem {
    RightHanded = 0,
    LeftHanded = 1
};


enum DistanceMode

Mode used to determine what listener position to use when calculating distance attenuation.

enum dalia::DistanceMode {
    FromListener,
    FromDistanceProbe
};


enum EffectType

Defines the available DSP effect algorithms.

enum dalia::EffectType {
    None = 0,
    Biquad = 1
};


typedef ListenerMask

Routing mask used to target a specific listener. Can be combined to target multiple listeners using bitwise OR.

using dalia::ListenerMask = typedef uint32_t;


typedef LogCallback

Defines the signature for custom logging sinks.

using dalia::LogCallback = typedef std::function<void(LogLevel level, const char* context, const char* message)>;

By providing a custom callback function on engine initialization, the integrating application can route the engine's internal logs into its own logging framework.

Parameters:

  • level The severity of the log message.
  • context A short string identifying the engine subcontext from which the log originated.
  • message The log text.

enum LogLevel

The level at which the DALIA audio engine should produce log messages.

enum dalia::LogLevel {
    Debug = 0,
    Info = 1,
    Warning = 2,
    Error = 3,
    Critical = 4,
    None = 5
};


typedef PlaybackExitCallback

Defines the signature for playback instance termination callbacks.

using dalia::PlaybackExitCallback = typedef std::function<void(PlaybackHandle playback, PlaybackExitCondition exitCondition)>;

Parameters:

  • playback The handle to the playback instance that has just terminated.
  • exitCondition The reason why the playback instance stopped.

enum PlaybackExitCondition

The condition under which a playback instance was stopped.

enum dalia::PlaybackExitCondition {
    None = 0,
    NaturalEnd = 1,
    ExplicitStop = 2,
    Evicted = 3,
    Error = 4
};


enum Result

Return codes for the DALIA API.

enum dalia::Result {
    Ok = 0,
    Error = -1,
    NotInitialized = -2,
    StateCorrupted = -3,
    AlreadyInitialized = -4,
    InvalidArgs = -5,
    InvalidHandle = -6,
    ExpiredHandle = -7,
    BusNotFound = -8,
    InvalidRouting = -9,
    InvalidEffectSlot = -10,
    ListenerNotFound = -11,
    PoolExhausted = -100,
    ResidentSoundPoolExhausted = -101,
    StreamSoundPoolExhausted = -102,
    VoicePoolExhausted = -103,
    StreamPoolExhausted = -104,
    BusPoolExhausted = -105,
    EffectPoolExhausted = -106,
    RtCommandQueueFull = -200,
    RtEventQueueFull = -201,
    IoStreamRequestQueueFull = -202,
    IoLoadRequestQueueFull = -203,
    PlaybackCorrupted = -303,
    SoundLoadError = -400,
    FileReadError = -401,
    UnsupportedFormat = -402,
    SystemError = -500,
    DeviceNotFound = -501,
    DeviceFailed = -502,
    ClientFailed = -503
};

Represents the success or failure of an API call. Values < 0 represent failures.


enum SoundType

Specifies the memory management and playback strategy for an audio asset.

enum dalia::SoundType {
    None = 0,
    Resident = 1,
    Stream = 2
};


Public Attributes Documentation

variable INVALID_REQUEST_ID

Sentinel value indicating a failed async request.

constexpr uint32_t dalia::INVALID_REQUEST_ID;


variable InvalidEffectHandle

constexpr EffectHandle dalia::InvalidEffectHandle;

variable InvalidPlaybackHandle

Sentinel value representing an invalid playback instance.

constexpr PlaybackHandle dalia::InvalidPlaybackHandle;


variable MASK_ALL_LISTENERS

Targets all listeners.

constexpr ListenerMask dalia::MASK_ALL_LISTENERS;


variable MASK_LISTENER_0

Targets listener 0.

constexpr ListenerMask dalia::MASK_LISTENER_0;


variable MASK_LISTENER_1

Targets listener 1.

constexpr ListenerMask dalia::MASK_LISTENER_1;


variable MASK_LISTENER_2

Targets listener 2.

constexpr ListenerMask dalia::MASK_LISTENER_2;


variable MASK_LISTENER_3

Targets listener 3.

constexpr ListenerMask dalia::MASK_LISTENER_3;


variable MASK_NONE

Targets none of the listeners (silent if spatial).

constexpr ListenerMask dalia::MASK_NONE;


variable MAX_STR_LEN_ASSET_PATH

The maximum string length (including null-terminator) of a filepath.

constexpr size_t dalia::MAX_STR_LEN_ASSET_PATH;


variable MAX_STR_LEN_DEVICE

The maximum string length (including null-terminator) for device names and identifiers.

constexpr size_t dalia::MAX_STR_LEN_DEVICE;


Public Functions Documentation

function GetResultString

Converts a Result code into a readable string literal.

constexpr const char * dalia::GetResultString (
    const Result result
) 

Parameters:

  • result The Result code to evaluate.

Returns:

A null-terminated string describing the result.


function MakeListener3DAttributes

Constructs a listener transform for a listener that performs panning and attenuation logic from the same world position.

inline constexpr Listener3DAttributes dalia::MakeListener3DAttributes (
    const Vec3 & position,
    const Vec3 & forward,
    const Vec3 & up,
    const Vec3 & velocity
) 


function MakeListener3DAttributesSplit

Constructs a listener transform for a listener that performs panning and attenuation logic from two separate positions.

inline constexpr Listener3DAttributes dalia::MakeListener3DAttributesSplit (
    const Vec3 & position,
    const Vec3 & probePosition,
    const Vec3 & forward,
    const Vec3 & up,
    const Vec3 & velocity
) 


function MakeListenerMask

Creates a routing mask targeting a specific listener.

inline constexpr ListenerMask dalia::MakeListenerMask (
    uint32_t listenerIndex
) 

Note:

[Combining masks] Multiple masks can be combined using bitwise OR.

Parameters:

  • listenerIndex The zero-based index of the listener to target.

Returns:

A bitmask with the corresponding listener's bit enabled.



The documentation for this class was generated from the following file dalia/DeviceControl.h