Group core¶
Core functionalities of the SDK.
Classes¶
| Type | Name |
|---|---|
| class | SparkyStudios::Audio::Amplitude::AmAlignedReal32Buffer Class that handles aligned allocations to support vectorized operations. |
| struct | SparkyStudios::Audio::Amplitude::AmVersion A structure containing the version number of the library. |
| class | SparkyStudios::Audio::Amplitude::AudioBuffer Represents an audio buffer containing multiple channels. |
| class | SparkyStudios::Audio::Amplitude::AudioBufferChannel Represents a view to a single channel in an AudioBuffer . |
| class | SparkyStudios::Audio::Amplitude::AudioBufferCrossFader Helper class used to cross fade between audio buffers. |
| class | SparkyStudios::Audio::Amplitude::HRIRSphere Represents a Head-Related Impulse Response (HRIR) sphere. |
| struct | SparkyStudios::Audio::Amplitude::HRIRSphereFileHeaderDescription Provides metadata about an HRIR sphere file. |
| struct | SparkyStudios::Audio::Amplitude::HRIRSphereVertex A vertex in a HRIR sphere. |
| class | SparkyStudios::Audio::Amplitude::MPSCQueue <typename T, Capacity> Lock-free bounded multi-producer single-consumer queue. |
| class | SparkyStudios::Audio::Amplitude::RefCounter Holds the number of references to an object. |
| class | SparkyStudios::Audio::Amplitude::SPSCQueue <typename T, Capacity> Lock-free single-producer single-consumer queue. |
| struct | SparkyStudios::Audio::Amplitude::SoundFormat Describes the format of an audio sample. |
| class | SparkyStudios::Audio::Amplitude::Thread::AwaitablePoolTask A class representing a task executed within a pool, which allows awaiting its completion. |
| class | SparkyStudios::Audio::Amplitude::Thread::Pool Pool tasks scheduler class. |
| class | SparkyStudios::Audio::Amplitude::Thread::PoolTask Base class for pool tasks. |
Public Types¶
| Type | Name |
|---|---|
| typedef void(* | AmThreadFunction The AmThreadFunction signature is used to create threads. |
| enum AmUInt8 | eAudioSampleFormat Lists the possible sample formats handled by Amplitude. |
| enum AmUInt8 | eErrorCode Lists the possible errors encountered by the library. |
| enum AmUInt8 | eHRIRSphereDatasetModel The model of the HRIR sphere dataset. |
| enum AmUInt8 | eHRIRSphereSamplingMode Defines how the HRIR sphere is sampled when doing Ambisonics binauralization. |
| enum AmUInt8 | ePanningMode Lists the available panning modes. |
| enum AmUInt8 | eScope Lists the available scopes for sound objects. |
| enum AmUInt8 | eSpatialization Lists the available spatialization modes. |
Public Attributes¶
| Type | Name |
|---|---|
| AmSize | kAm51SurroundChannelCount = 6The number of channels in a 5.1-surround audio source. |
| AmSize | kAm71SurroundChannelCount = 8The number of channels in a 7.1-surround audio source. |
| AmUInt32 | kAmAirAbsorptionBandCount = 3The number of air absorption bands for attenuation models. |
| AmSize | kAmFirstOrderAmbisonicChannelCount = 4The number of channels in a first-order ambisonic source. |
| AmInt32 | kAmFixedPointBits = 15The number of bits to shift when processing audio data with floating point values. |
| AmInt32 | kAmFixedPointMask = (kAmFixedPointBits - 1)Used to mask the bits when processing audio data with fixed-point values. |
| AmInt32 | kAmFixedPointUnit = (1 << kAmFixedPointBits)The unit value for a 32-bit fixed-point audio sample. |
| AmObjectID | kAmInvalidObjectId = 0Invalid Amplitude object ID. |
| AmBusID | kAmMasterBusId = 1Specifies the value of the "master" bus ID. |
| AmSize | kAmMaxChannelInstances = 1024The maximum number of channel instances supported per channel. |
| AmUInt32 | kAmMaxSupportedAmbisonicOrder = 3The maximum supported ambisonic order. |
| AmUInt32 | kAmMaxSupportedChannelCount = (kAmMaxSupportedAmbisonicOrder + 1) \* (kAmMaxSupportedAmbisonicOrder + 1)The maximum supported channel count for an ambisonic source. |
| AmUInt64 | kAmMaxSupportedFrameCount = 16384The maximum number of frames that can be processed at once. |
| AmSize | kAmMonoChannelCount = 1The number of channels in a mono audio source. |
| AmSize | kAmRoomSurfaceCount = 6The number of surfaces in a room. |
| AmTime | kAmSecond = 1000.0The number of milliseconds in one second. |
| AmSize | kAmSecondOrderAmbisonicChannelCount = 9The number of channels in a second-order ambisonic source. |
| AmSize | kAmStereoChannelCount = 2The number of channels in a stereo audio source. |
| AmSize | kAmThirdOrderAmbisonicChannelCount = 16The number of channels in a third-order ambisonic source. |
| AmReal32 | kEpsilon = 1e-6fMinimum value where values lower than this are considered to be 0. |
| AmReal32 | kHighCutoffFrequencies = { 800.0f, 8000.0f, 22000.0f }The high cutoff frequencies for air absorption models. |
| AmReal32 | kLowCutoffFrequencies = { 0.0f, 800.0f, 8000.0f }The low cutoff frequencies for air absorption models. |
| AmTime | kMinFadeDuration = 10.0The minimum fade duration in milliseconds. |
Public Functions¶
| Type | Name |
|---|---|
| AmThreadHandle | CreateThread (AmThreadFunction threadFunction, AmVoidPtr parameter=nullptr) Creates a new thread. |
| AmUInt32 | GetCPUCount () Gets the number of hardware CPU. |
| AmThreadID | GetCurrentThreadId () Gets the handle of the calling thread. |
| AmUInt64 | GetTimeMillis () Gets the total execution time in milliseconds for the calling thread. |
| const AmVersion & | GetVersion () Returns the version. |
| void | Release (AmThreadHandle & thread) Manually stops a thread execution. |
| void | Sleep (AmInt32 milliseconds) Makes the calling thread sleep for the given number of milliseconds. |
| void | Wait (AmThreadHandle & thread) Waits for the given thread to stop. |
Macros¶
| Type | Name |
|---|---|
| define | AM_CALLBACK (_type_, _name_) typedef \_type\_(AM\_CALL\_POLICY\* \_name\_)Declare a callback function type. |
| define | AM_TO_STRING (X) AM\_STRING\_EXPAND(X)Turn X into a string literal. |
| define | AM_UNUSED (x) ((void)(x))Helps to avoid compiler warnings about unused values. |
| define | amVersion [**SparkyStudios::Audio::Amplitude::GetVersion**](group__core.md#function-getversion)()Gets the current Amplitude SDK version. |
Public Types Documentation¶
AmThreadFunction
The AmThreadFunction signature is used to create threads.
eAudioSampleFormat
Lists the possible sample formats handled by Amplitude.
eErrorCode
Lists the possible errors encountered by the library.
eHRIRSphereDatasetModel
The model of the HRIR sphere dataset.
eHRIRSphereSamplingMode
Defines how the HRIR sphere is sampled when doing Ambisonics binauralization.
ePanningMode
Lists the available panning modes.
eSpatialization
Lists the available spatialization modes.
Public Attributes Documentation¶
kAm51SurroundChannelCount
The number of channels in a 5.1-surround audio source.
kAm71SurroundChannelCount
The number of channels in a 7.1-surround audio source.
kAmAirAbsorptionBandCount
The number of air absorption bands for attenuation models.
kAmFirstOrderAmbisonicChannelCount
The number of channels in a first-order ambisonic source.
kAmFixedPointBits
The number of bits to shift when processing audio data with floating point values.
kAmFixedPointMask
Used to mask the bits when processing audio data with fixed-point values.
kAmFixedPointUnit
The unit value for a 32-bit fixed-point audio sample.
kAmInvalidObjectId
Invalid Amplitude object ID.
kAmMasterBusId
Specifies the value of the "master" bus ID.
kAmMaxChannelInstances
The maximum number of channel instances supported per channel.
kAmMaxSupportedAmbisonicOrder
The maximum supported ambisonic order.
kAmMaxSupportedChannelCount
The maximum supported channel count for an ambisonic source.
kAmMaxSupportedFrameCount
The maximum number of frames that can be processed at once.
kAmMonoChannelCount
The number of channels in a mono audio source.
kAmRoomSurfaceCount
The number of surfaces in a room.
Warning:
Only cube-shaped rooms are supported.
kAmSecond
The number of milliseconds in one second.
kAmSecondOrderAmbisonicChannelCount
The number of channels in a second-order ambisonic source.
kAmStereoChannelCount
The number of channels in a stereo audio source.
kAmThirdOrderAmbisonicChannelCount
The number of channels in a third-order ambisonic source.
kEpsilon
Minimum value where values lower than this are considered to be 0.
kHighCutoffFrequencies
The high cutoff frequencies for air absorption models.
kLowCutoffFrequencies
The low cutoff frequencies for air absorption models.
kMinFadeDuration
The minimum fade duration in milliseconds.
Public Functions Documentation¶
CreateThread
Creates a new thread.
Parameters:
-
threadFunctionThe function to run in the thread. -
parameterAn optional shared data to pass to the thread
GetTimeMillis
Gets the total execution time in milliseconds for the calling thread.
Release
Manually stops a thread execution.
Parameters:
-
threadThe handle of the thread to stop.
Sleep
Makes the calling thread sleep for the given number of milliseconds.
Parameters:
-
millisecondsThe amount of time the calling thread should sleep.
Wait
Waits for the given thread to stop.
Parameters:
-
threadThe handle of the thread to wait.
Macro Definition Documentation¶
AM_CALLBACK
Declare a callback function type.
Parameters:
_type_Return type of the function_name_Name of the function
Note:
This must be followed by the parentheses containing the function arguments declaration.
AM_TO_STRING
Turn X into a string literal.
Parameters:
XThe value to transform into a string literal
AM_UNUSED
Helps to avoid compiler warnings about unused values.
Parameters:
xThe statement where the return value is not used.
amVersion
Gets the current Amplitude SDK version.