CryAudio

CryAudio Namespace Reference

Most parent audio namespace used throughout the entire engine. More...

Namespaces

Impl
Sub-namespace of the CryAudio namespace used by audio middleware implementations.

Classes

struct IAudioSystem
Main interface to the audio system, allowing access to audio playback via implementation plug-ins. More...
struct IListener
A struct exposing public methods to interact with audio listeners. More...
struct IObject
A struct exposing public methods to interact with audio objects. More...

Typedefs

using IdType = uint32
using ControlId = IdType
using SwitchStateId = IdType
using EnvironmentId = IdType
using PreloadRequestId = IdType
using FileEntryId = IdType
using TriggerImplId = IdType
using TriggerInstanceId = IdType
using EnumFlagsType = IdType
using AuxObjectId = IdType
using LibraryId = IdType
using DeviceId = uint8

Enumerations

enum ERequestFlags : EnumFlagsType {
ERequestFlags::None, ERequestFlags::ExecuteBlocking = BIT(0), ERequestFlags::CallbackOnExternalOrCallingThread = BIT(1), ERequestFlags::CallbackOnAudioThread = BIT(2),
ERequestFlags::DoneCallbackOnExternalThread = BIT(3), ERequestFlags::DoneCallbackOnAudioThread = BIT(4)
}
A strongly typed enum class representing flags that can be passed into methods via the SRequestUserData parameter that control how an internally generated request behaves or what to do along with it. More...
enum ERequestStatus : EnumFlagsType {
ERequestStatus::None, ERequestStatus::Success, ERequestStatus::SuccessDoNotTrack, ERequestStatus::SuccessNeedsRefresh,
ERequestStatus::PartialSuccess, ERequestStatus::Failure, ERequestStatus::Pending, ERequestStatus::FailureInvalidControlId,
ERequestStatus::FailureInvalidRequest
}
A strongly typed enum class representing a list of possible statuses of an internally generated audio request. Used as a return type for many methods used by the AudioSystem internally and also for most of the CryAudio::Impl::IImpl calls. More...
enum ERequestResult : EnumFlagsType { ERequestResult::None, ERequestResult::Success, ERequestResult::Failure }
A strongly typed enum class representing a list of possible outcomes of a request which gets communicated via the callbacks if the user decided to be informed of the outcome of a particular request. More...
enum ESystemEvents : EnumFlagsType {
ESystemEvents::None = 0, ESystemEvents::ImplSet = BIT(0), ESystemEvents::TriggerExecuted = BIT(1), ESystemEvents::TriggerFinished = BIT(2),
ESystemEvents::FilePlay = BIT(3), ESystemEvents::FileStarted = BIT(4), ESystemEvents::FileStopped = BIT(5), ESystemEvents::All = 0xFFFFFFFF
}
A strongly typed enum class representing different audio system events that can be listened to. More...
enum EDataScope : EnumFlagsType { EDataScope::None, EDataScope::Global, EDataScope::LevelSpecific, EDataScope::All }
A strongly typed enum class representing different audio specific data scopes. This is used on data such as the audio controls for example to limit their presence to a specific time frame of the program. More...
enum EOcclusionType : EnumFlagsType {
EOcclusionType::None, EOcclusionType::Ignore, EOcclusionType::Adaptive, EOcclusionType::Low,
EOcclusionType::Medium, EOcclusionType::High, EOcclusionType::Count
}
A strongly typed enum class representing different audio occlusion types that can be set on audio objects. More...
enum ELogType : EnumFlagsType {
ELogType::None, ELogType::Comment, ELogType::Warning, ELogType::Error,
ELogType::Always
}
A strongly typed enum class representing different audio specific log types. More...
enum EEventState : EnumFlagsType {
None, Playing, PlayingDelayed, Loading,
Unloading, Virtual
}

Functions

CRY_CREATE_ENUM_FLAG_OPERATORS (ERequestFlags)
CRY_CREATE_ENUM_FLAG_OPERATORS (ESystemEvents)
CRY_CREATE_ENUM_FLAG_OPERATORS (EOcclusionType)

Detailed Description

Most parent audio namespace used throughout the entire engine.

Enumeration Type Documentation

◆ EDataScope

enum CryAudio::EDataScope : EnumFlagsType
strong

A strongly typed enum class representing different audio specific data scopes. This is used on data such as the audio controls for example to limit their presence to a specific time frame of the program.

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

Global

Data exists globally.

LevelSpecific

Data exists only while the corresponding level is loaded.

All

Used when the data scope is of no significance for the executing code.

◆ ELogType

enum CryAudio::ELogType : EnumFlagsType
strong

A strongly typed enum class representing different audio specific log types.

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

Comment

The message will be displayed in standard color but verbosity level must be set to at least 4.

Warning

The message will be displayed in orange color.

Error

The message will be displayed in red color.

Always

The message will be displayed in standard color and always printed regardless of verbosity level.

◆ EOcclusionType

enum CryAudio::EOcclusionType : EnumFlagsType
strong

A strongly typed enum class representing different audio occlusion types that can be set on audio objects.

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

Ignore

The audio object does not calculate occlusion against level geometry.

Adaptive

The audio object switches between occlusion types depending on its distance to the audio listener.

Low

The audio object uses a coarse grained occlusion plane for calculation.

Medium

The audio object uses a medium grained occlusion plane for calculation.

High

The audio object uses a fine grained occlusion plane for calculation.

Count

Used to initialize arrays to this size.

◆ ERequestFlags

enum CryAudio::ERequestFlags : EnumFlagsType
strong

A strongly typed enum class representing flags that can be passed into methods via the SRequestUserData parameter that control how an internally generated request behaves or what to do along with it.

Enumerator
None

Used to initialize variables of this type.

ExecuteBlocking

Blocks the calling thread until the request has been processed.

CallbackOnExternalOrCallingThread

Invokes a callback on the calling thread for blocking requests or invokes a callback on the external thread for non-blocking requests.

CallbackOnAudioThread

Invokes a callback on the audio thread informing of the outcome of the request.

DoneCallbackOnExternalThread

Invokes a callback on the external thread once a trigger instance finished playback of all its events.

DoneCallbackOnAudioThread

Invokes a callback on the audio thread once a trigger instance finished playback of all its events.

◆ ERequestResult

enum CryAudio::ERequestResult : EnumFlagsType
strong

A strongly typed enum class representing a list of possible outcomes of a request which gets communicated via the callbacks if the user decided to be informed of the outcome of a particular request.

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

Success

Set if the request processed successfully.

Failure

Set if the request failed to process.

◆ ERequestStatus

enum CryAudio::ERequestStatus : EnumFlagsType
strong

A strongly typed enum class representing a list of possible statuses of an internally generated audio request. Used as a return type for many methods used by the AudioSystem internally and also for most of the CryAudio::Impl::IImpl calls.

/**

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

Success

Returned if the request processed successfully.

SuccessDoNotTrack

Audio middleware implementations return this if during ExecuteTrigger an event was actually stopped so that internal data can be immediately freed.

SuccessNeedsRefresh

Audio middleware implementations return this if after an action they require to be refreshed.

PartialSuccess

Returned if the outcome of the request wasn't a complete success but also not complete failure.

Failure

Returned if the request failed to process.

Pending

Returned if the request was delivered but final execution is pending. It's then kept in the system until its status changed.

FailureInvalidControlId

Returned if the request referenced a non-existing audio control.

FailureInvalidRequest

Returned if the request type is unknown/unhandled.

◆ ESystemEvents

enum CryAudio::ESystemEvents : EnumFlagsType
strong

A strongly typed enum class representing different audio system events that can be listened to.

Enumerator
None

Used to initialize variables of this type and to determine whether the variable was properly handled.

ImplSet

Invoked once the audio middleware implementation has been set.

TriggerExecuted

Invoked once a trigger finished starting all of its event connections.

TriggerFinished

Invoked once all of the spawned event instances finished playing.

FilePlay

Invoked once playback of a standalone file is issued.

FileStarted

Invoked once playback of a standalone file has started.

FileStopped

Invoked once playback of a standalone file has stopped.

All

Listen to all supported audio system events.