Skip to main content
Version: 20 Mar 2024

Audio Definitions

Module: Audio

More...

Modules

Name
Control
CONTROL.
Parameters
PARAMETERS.
Acoustics
ACOUSTICS.
Audio Output

Classes

Name
structMLAudioMultibandLevel
Properties specifying a broadband level and three sub-band levels.

Types

Name
typedef struct MLAudioMultibandLevelMLAudioMultibandLevel
Properties specifying a broadband level and three sub-band levels.

Enums

Name
enumMLAudioMicCaptureType
{
MLAudioMicCaptureType_VoiceComm,
MLAudioMicCaptureType_VoiceCapture,
MLAudioMicCaptureType_WorldCapture =4,
MLAudioMicCaptureType_RawMicsAndAECRef,
MLAudioMicCaptureType_Ensure32Bits =0x7FFFFFFF
}
The type of mic input to capture.

Attributes

Name
floatmain
floatlf
floatmf
floathf
MLAudioMultibandLevelgain
floatpre_delay
MLAudioMultibandLevelgain
floatpre_delay
floatdecay_time
floatdecay_time_lf_ratio
floatdecay_time_hf_ratio
floatmin_distance
floatmax_distance
floatrolloff_factor
floatinner_angle
floatouter_angle
floatouter_gain
floatouter_gain_lf
floatouter_gain_mf
floatouter_gain_hf
MLVec3feye_point
MLVec3fend_point
floatfactor
MLVec3fhit_point
MLHandlesource_id
MLHandleimage_id
uint32_tleg_index
MLAudioRaycastray
MLHandlesource_id
MLHandleimage_id
uint32_tleg_index
MLAudioRaycastray
MLAudioObstructionobstruction
uint32_tchannel_count
uint32_tsamples_per_second
uint32_tbits_per_sample
uint32_tvalid_bits_per_sample
MLAudioSampleFormatsample_format
MLAudioChannelFormatchannel_format
uint8_t *ptr
uint32_tsize
float *values
int32_tnum_columns
int32_tnum_rows

Detailed Description

AUDIO DEFINITIONS.


Enums Documentation

MLAudioMicCaptureType

EnumeratorValueDescription
MLAudioMicCaptureType_VoiceCommUser voice, suitable for communications. Mono, 16 bit integer, 16k sampling rate.
MLAudioMicCaptureType_VoiceCaptureHigh fidelity user voice, suitable for recording. Mono, 16 bit integer, 48k sampling rate.
MLAudioMicCaptureType_WorldCapture=4Mic mix representing the user's surroundings. Stereo, 16 bit integer, 48k sampling rate.
MLAudioMicCaptureType_RawMicsAndAECRefAll 4 mics unprocessed (front L/R, side L/R) + AEC return from amp (L/R). Channel layout: 1 - Front L, 2 - Front R, 3 - Side L, 4 - Side R, 5 - AEC return L, 6 - AEC return R. DC Offset and/or background hum may be present on channels 1-4 due to lack of processing. 6-channel, 16 bit integer, 48k sampling rate.
MLAudioMicCaptureType_Ensure32Bits=0x7FFFFFFFEnsure enum is represented as 32 bits.

The type of mic input to capture.

API Level:

  • 29

Types Documentation

MLAudioMultibandLevel

typedef struct MLAudioMultibandLevel MLAudioMultibandLevel;

Properties specifying a broadband level and three sub-band levels.

More Info

API Level:

  • 20

Attributes Documentation

main

float main;

Level for all frequencies. Range is contextual. Default is 1.


lf

float lf;

Level for low frequencies. Range is contextual. Default is 1.


mf

float mf;

Level for mid frequencies. Range is contextual. Default is 1.


hf

float hf;

Level for high frequencies. Range is contextual. Default is 1.


gain

MLAudioMultibandLevel gain;
TypeDescription
MLAudioMultibandLevelProperties specifying a broadband level and three sub-band levels.

Dispersion output mix level. Range is [0, 0, 0, 0] to [8, 2, 2, 2]. Default is [0.25, 1, 1, 1].


pre_delay

float pre_delay;

Delay (secs) from direct sound to earliest reflection cluster onset. Must be <= reverb pre_delay. Range is 0.005 to 0.1. Default is 0.01.


gain

MLAudioMultibandLevel gain;
TypeDescription
MLAudioMultibandLevelProperties specifying a broadband level and three sub-band levels.

Reverb output mix level. Range is [0, 0, 0, 0] to [8, 2, 2, 2]. Default is [0.16, 1, 1, 1].


pre_delay

float pre_delay;

Delay (secs) from direct sound to the late reverberation onset. Must be >= dispersion pre_delay. Range is 0.02 to 0.1. Default is 0.03.


decay_time

float decay_time;

Decay time (secs) for late reverberation. Range is 0 to 20. Default is 0.7.


decay_time_lf_ratio

float decay_time_lf_ratio;

Relative reverberation decay time multiplying factor for low frequencies. Range is 0.1 to 2. Default is 1.


decay_time_hf_ratio

float decay_time_hf_ratio;

Relative reverberation decay time multiplying factor for high frequencies. Range is 0.1 to 2. Default is 0.6.


min_distance

float min_distance;

Distance until which sound is at full volume. Range is 0 to FLT_MAX. Default is 1.


max_distance

float max_distance;

Distance beyond which sound gets no quieter. Range is min_distance to FLT_MAX. Default is FLT_MAX.


rolloff_factor

float rolloff_factor;

Scale factor relative to real-world distance attenuation. Range is 0 to FLT_MAX. Default is 1 (real world).


inner_angle

float inner_angle;

Angle in degrees defining the sides of a cone, within which there is no radiation attenuation. Range is 0 to 360. Default is 50.


outer_angle

float outer_angle;

Angle in degrees defining the sides of a cone, beyond which the outer_gain values are fully applied. Range is 0 to 360. Default is 340.


outer_gain

float outer_gain;

Gain applied beyond outer cone for all frequencies. Range is 0 to 1. Default is 1.


outer_gain_lf

float outer_gain_lf;

Gain applied beyond outer cone for low frequencies. Range is 0 to 1. Default is 0.65.


outer_gain_mf

float outer_gain_mf;

Gain applied beyond outer cone for mid frequencies. Range is 0 to 1. Default is 0.4.


outer_gain_hf

float outer_gain_hf;

Gain applied beyond outer cone for high frequencies. Range is 0 to 1. Default is 0.08.


eye_point

MLVec3f eye_point;

Starting point of the ray.


end_point

MLVec3f end_point;

Ending point of the ray.


factor

float factor;

Amount of obstruction [0-1] with 1 = fully applied transmission values.


hit_point

MLVec3f hit_point;

Location of obstruction.


source_id

MLHandle source_id;
TypeDescription
MLHandleInteger handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not.

Internal identifier.


image_id

MLHandle image_id;
TypeDescription
MLHandleInteger handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not.

Internal identifier.


leg_index

uint32_t leg_index;

Internal identifier.


ray

MLAudioRaycast ray;
TypeDescription
MLAudioRaycastTwo points in space describing a ray.

Raycast to test for obstruction.


source_id

MLHandle source_id;
TypeDescription
MLHandleInteger handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not.

Internal identifier.


image_id

MLHandle image_id;
TypeDescription
MLHandleInteger handle type used to reference many things returned by the API, instead of returning pointers directly. Use MLHandleIsValid() to check if a handle is valid or not.

Internal identifier.


leg_index

uint32_t leg_index;

Internal identifier.


ray

MLAudioRaycast ray;
TypeDescription
MLAudioRaycastTwo points in space describing a ray.

Raycast tested for obstruction.


obstruction

MLAudioObstruction obstruction;
TypeDescription
MLAudioObstructionObstruction along a ray.

Result of obstruction test.


channel_count

uint32_t channel_count;

Number of channels.


samples_per_second

uint32_t samples_per_second;

Sample rate.


bits_per_sample

uint32_t bits_per_sample;

Number of bits per sample.


valid_bits_per_sample

uint32_t valid_bits_per_sample;

Number of bits used per sample.


sample_format

MLAudioSampleFormat sample_format;

Integer or float. Float is not currently implemented for buffered I/O.


channel_format

MLAudioChannelFormat channel_format;

Channel configuration.


ptr

uint8_t * ptr;

Pointer to audio data.


size

uint32_t size;

Size of audio data in bytes.


values

float * values;

Magnitudes of the spectral energy in a column-major matrix.


num_columns

int32_t num_columns;

Number of bands of spectral energy.


num_rows

int32_t num_rows;

Number of divisions of the time window.