Skip to content

Group engine

Engine-specific functionalities.

Classes

Type Name
class SparkyStudios::Audio::Amplitude::AttenuationZone
The propagation shape for positional sounds.
class SparkyStudios::Audio::Amplitude::Bus
An object representing one node in the tree of buses. Buses are used to adjust a set of channel gains in tandem.
class SparkyStudios::Audio::Amplitude::Channel
An object that represents a single channel of audio.
struct SparkyStudios::Audio::Amplitude::ChannelEventInfo
The event info passed to the channel event listener.
class SparkyStudios::Audio::Amplitude::ChannelEventListener
Channel event listener.
class SparkyStudios::Audio::Amplitude::ChannelInstance
Represents a single position instance within a multi-position channel.
class SparkyStudios::Audio::Amplitude::Codec
Audio file reader and writer.
struct SparkyStudios::Audio::Amplitude::DeviceDescription
The device description.
class SparkyStudios::Audio::Amplitude::Driver
Base class used to create device drivers.
class SparkyStudios::Audio::Amplitude::EffectInstance
An instance of an Effect asset.
class SparkyStudios::Audio::Amplitude::Engine
The Amplitude engine.
class SparkyStudios::Audio::Amplitude::Entity
An Entity represents a spatially positioned object in the game.
class SparkyStudios::Audio::Amplitude::Environment
An Environment is a zone where every spatialized audio playing inside him got applied a specific effect.
class SparkyStudios::Audio::Amplitude::EventCanceler
Helper class used to cancel a running Event .
class SparkyStudios::Audio::Amplitude::EventInstance
A triggered event.
class SparkyStudios::Audio::Amplitude::Fader
Base class used to create faders.
class SparkyStudios::Audio::Amplitude::FaderInstance
A Fader instance.
class SparkyStudios::Audio::Amplitude::Listener
An object used to render sound sources.
class SparkyStudios::Audio::Amplitude::Room
Represents a physical space where sound waves can propagate.
struct SparkyStudios::Audio::Amplitude::RoomWallMaterial
Represents the material of a Room wall.
struct SparkyStudios::Audio::Amplitude::RtpcValue
A RTPC-compatible value is used as a wrapper to hold property values that can be linked to RTPCs.
class SparkyStudios::Audio::Amplitude::SoundObject
Base class for Amplitude sound objects.
struct SparkyStudios::Audio::Amplitude::SwitchContainerItem
Describes a single item within a switch container.
struct SparkyStudios::Audio::Amplitude::SwitchState
A switch state.

Public Types

Type Name
typedef std::function< void(ChannelEventInfo)> ChannelEventCallback
A callback function for handling channel events.
enum AmUInt16 PlaybackOutputChannels
The playback output channel layout of the device.
enum AmUInt16 PlaybackOutputFormat
The playback output format of the device.
enum AmUInt8 eChannelEvent
Lists the events triggered by a Channel during playback.
enum AmUInt8 eChannelInstanceMode
Defines how channel instances share audio data.
enum AmUInt8 eChannelPlaybackState
Lists the playback states for a Channel .
enum AmUInt8 eDeviceNotification
The possible device notification types.
enum AmUInt8 eDeviceState
The device state.
enum AmInt8 eFaderState
Lists the possible states a fader can have.
enum AmUInt8 eRoomWall
Lists the walls in a Room .
enum AmUInt8 eRoomWallMaterialType
Defines the material type of Room walls.

Public Functions

Type Name
AM_CALLBACK (void, DeviceNotificationCallback)
The device notification callback.
void CallDeviceNotificationCallback (eDeviceNotification notification, const DeviceDescription & device, Driver * driver)
Calls the registered device notification callback.
void RegisterDeviceNotificationCallback (DeviceNotificationCallback callback)
Registers a callback to listen to device state changes.
void UnregisterDeviceNotificationCallback ()
Unregisters the registered device notification callback.

Macros

Type Name
define AM_AUDIO_SAMPLE_MAX (+1.0f)
The maximum value for an audio sample.
define AM_AUDIO_SAMPLE_MIN (-1.0f)
The minimum value for an audio sample.
define AM_INVALID_HANDLE nullptr
Define an invalid object handle.
define AM_IS_VALID_HANDLE (handle) ((handle) != [**AM\_INVALID\_HANDLE**](group__engine.md#define-am_invalid_handle))
Checks if a handle is valid.
define amEngine [**SparkyStudios::Audio::Amplitude::Engine::GetInstance**](class_sparky_studios_1_1_audio_1_1_amplitude_1_1_engine.md#function-getinstance)()
Macro to get the current Amplitude engine instance.

Public Types Documentation

ChannelEventCallback

A callback function for handling channel events.

typedef std::function<void(ChannelEventInfo)> SparkyStudios::Audio::Amplitude::ChannelEventCallback;
PlaybackOutputChannels

The playback output channel layout of the device.

enum PlaybackOutputChannels {
    Default = 0,
    Mono = 1,
    Stereo = 2,
    Quad = 4,
    Surround_5_1 = 6,
    Surround_7_1 = 8
};
PlaybackOutputFormat

The playback output format of the device.

enum PlaybackOutputFormat {
    Default = 0,
    UInt8 = 1,
    Int16 = 2,
    Int24 = 3,
    Int32 = 4,
    Float32 = 5
};
eChannelEvent

Lists the events triggered by a Channel during playback.

enum eChannelEvent {
    eChannelEvent_Begin = 0,
    eChannelEvent_End = 1,
    eChannelEvent_Resume = 2,
    eChannelEvent_Pause = 3,
    eChannelEvent_Stop = 4,
    eChannelEvent_Loop = 5
};
eChannelInstanceMode

Defines how channel instances share audio data.

enum eChannelInstanceMode {
    eChannelInstanceMode_Blended = 0,
    eChannelInstanceMode_Separate = 1
};

This determines the playback behavior when a channel has multiple position instances.

eChannelPlaybackState

Lists the playback states for a Channel .

enum eChannelPlaybackState {
    eChannelPlaybackState_Stopped = 0,
    eChannelPlaybackState_Playing = 1,
    eChannelPlaybackState_FadingIn = 2,
    eChannelPlaybackState_FadingOut = 3,
    eChannelPlaybackState_SwitchingState = 4,
    eChannelPlaybackState_Paused = 5,
    eChannelPlaybackState_Pending = 6
};
eDeviceNotification

The possible device notification types.

enum eDeviceNotification {
    eDeviceNotification_Opened,
    eDeviceNotification_Started,
    eDeviceNotification_Rerouted,
    eDeviceNotification_Stopped,
    eDeviceNotification_Closed
};
eDeviceState

The device state.

enum eDeviceState {
    eDeviceState_Opened,
    eDeviceState_Started,
    eDeviceState_Paused,
    eDeviceState_Stopped,
    eDeviceState_Closed
};
eFaderState

Lists the possible states a fader can have.

enum eFaderState {
    eFaderState_Stopped = -1,
    eFaderState_Disabled = 0,
    eFaderState_Active = 1
};
eRoomWall

Lists the walls in a Room .

enum eRoomWall {
    eRoomWall_Left = 0,
    eRoomWall_Right,
    eRoomWall_Floor,
    eRoomWall_Bottom = eRoomWall_Floor,
    eRoomWall_Ceiling,
    eRoomWall_Top = eRoomWall_Ceiling,
    eRoomWall_Front,
    eRoomWall_Back,
    eRoomWall_Invalid
};
eRoomWallMaterialType

Defines the material type of Room walls.

enum eRoomWallMaterialType {
    eRoomWallMaterialType_Transparent = 0,
    eRoomWallMaterialType_AcousticTile,
    eRoomWallMaterialType_CarpetOnConcrete,
    eRoomWallMaterialType_HeavyDrapes,
    eRoomWallMaterialType_GypsumBoard,
    eRoomWallMaterialType_ConcreteUnpainted,
    eRoomWallMaterialType_Wood,
    eRoomWallMaterialType_BrickPainted,
    eRoomWallMaterialType_FoamPanel,
    eRoomWallMaterialType_Glass,
    eRoomWallMaterialType_PlasterSmooth,
    eRoomWallMaterialType_Metal,
    eRoomWallMaterialType_Marble,
    eRoomWallMaterialType_WaterSurface,
    eRoomWallMaterialType_IceSurface,
    eRoomWallMaterialType_Custom
};

Use this enum when you want to use predefined absorption coefficients for a wall. Note that the predefined coefficients are only for reference and may not be accurate for your specific use case.

You can use the RoomWallMaterialType::Custom to define a custom material. This will need you to provide the absorption coefficients yourself.

Public Functions Documentation

AM_CALLBACK

The device notification callback.

AM_CALLBACK (
    void,
    DeviceNotificationCallback
) 

Parameters:

  • notification The notification type.
  • device The device description.
  • driver The driver which triggered the device notification.
CallDeviceNotificationCallback

Calls the registered device notification callback.

void CallDeviceNotificationCallback (
    eDeviceNotification notification,
    const DeviceDescription & device,
    Driver * driver
) 

Parameters:

  • notification The notification type.
  • device The device description.
  • driver The driver which triggered the device notification.
RegisterDeviceNotificationCallback

Registers a callback to listen to device state changes.

void RegisterDeviceNotificationCallback (
    DeviceNotificationCallback callback
) 

Parameters:

  • callback The callback to register.
UnregisterDeviceNotificationCallback

Unregisters the registered device notification callback.

void UnregisterDeviceNotificationCallback () 

Macro Definition Documentation

AM_AUDIO_SAMPLE_MAX

The maximum value for an audio sample.

#define AM_AUDIO_SAMPLE_MAX `(+1.0f)`
AM_AUDIO_SAMPLE_MIN

The minimum value for an audio sample.

#define AM_AUDIO_SAMPLE_MIN `(-1.0f)`
AM_INVALID_HANDLE

Define an invalid object handle.

#define AM_INVALID_HANDLE `nullptr`
AM_IS_VALID_HANDLE

Checks if a handle is valid.

#define AM_IS_VALID_HANDLE (
    handle
) `((handle) != AM_INVALID_HANDLE )`

Parameters:

  • handle The handle to check

Returns:

true if the handle is valid, false otherwise.

amEngine

Macro to get the current Amplitude engine instance.

#define amEngine `SparkyStudios::Audio::Amplitude::Engine::GetInstance ()`