Audio Definitions
Module: Audio
Modules
| Name | 
|---|
| Control CONTROL. | 
| Parameters PARAMETERS. | 
| Acoustics ACOUSTICS. | 
| Audio Output | 
Classes
| Name | |
|---|---|
| struct | MLAudioMultibandLevel Properties specifying a broadband level and three sub-band levels. | 
Types
| Name | |
|---|---|
| typedef struct MLAudioMultibandLevel | MLAudioMultibandLevel Properties specifying a broadband level and three sub-band levels. | 
Enums
| Name | |
|---|---|
| enum | MLAudioMicCaptureType { MLAudioMicCaptureType_VoiceComm, MLAudioMicCaptureType_VoiceCapture, MLAudioMicCaptureType_WorldCapture =4, MLAudioMicCaptureType_RawMicsAndAECRef, MLAudioMicCaptureType_Ensure32Bits =0x7FFFFFFF } The type of mic input to capture. | 
Attributes
| Name | |
|---|---|
| float | main | 
| float | lf | 
| float | mf | 
| float | hf | 
| MLAudioMultibandLevel | gain | 
| float | pre_delay | 
| MLAudioMultibandLevel | gain | 
| float | pre_delay | 
| float | decay_time | 
| float | decay_time_lf_ratio | 
| float | decay_time_hf_ratio | 
| float | min_distance | 
| float | max_distance | 
| float | rolloff_factor | 
| float | inner_angle | 
| float | outer_angle | 
| float | outer_gain | 
| float | outer_gain_lf | 
| float | outer_gain_mf | 
| float | outer_gain_hf | 
| MLVec3f | eye_point | 
| MLVec3f | end_point | 
| float | factor | 
| MLVec3f | hit_point | 
| MLHandle | source_id | 
| MLHandle | image_id | 
| uint32_t | leg_index | 
| MLAudioRaycast | ray | 
| MLHandle | source_id | 
| MLHandle | image_id | 
| uint32_t | leg_index | 
| MLAudioRaycast | ray | 
| MLAudioObstruction | obstruction | 
| uint32_t | channel_count | 
| uint32_t | samples_per_second | 
| uint32_t | bits_per_sample | 
| uint32_t | valid_bits_per_sample | 
| MLAudioSampleFormat | sample_format | 
| MLAudioChannelFormat | channel_format | 
| uint8_t * | ptr | 
| uint32_t | size | 
| float * | values | 
| int32_t | num_columns | 
| int32_t | num_rows | 
Detailed Description
AUDIO DEFINITIONS.
Enums Documentation
MLAudioMicCaptureType
| Enumerator | Value | Description | 
|---|---|---|
| MLAudioMicCaptureType_VoiceComm | User voice, suitable for communications. Mono, 16 bit integer, 16k sampling rate. | |
| MLAudioMicCaptureType_VoiceCapture | High fidelity user voice, suitable for recording. Mono, 16 bit integer, 48k sampling rate. | |
| MLAudioMicCaptureType_WorldCapture | =4 | Mic mix representing the user's surroundings. Stereo, 16 bit integer, 48k sampling rate. | 
| MLAudioMicCaptureType_RawMicsAndAECRef | All 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 | =0x7FFFFFFF | Ensure 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.
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;
| Type | Description | 
|---|---|
| MLAudioMultibandLevel | Properties 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;
| Type | Description | 
|---|---|
| MLAudioMultibandLevel | Properties 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;
| Type | Description | 
|---|---|
| MLHandle | Integer 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;
| Type | Description | 
|---|---|
| MLHandle | Integer 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;
| Type | Description | 
|---|---|
| MLAudioRaycast | Two points in space describing a ray. | 
Raycast to test for obstruction.
source_id
MLHandle source_id;
| Type | Description | 
|---|---|
| MLHandle | Integer 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;
| Type | Description | 
|---|---|
| MLHandle | Integer 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;
| Type | Description | 
|---|---|
| MLAudioRaycast | Two points in space describing a ray. | 
Raycast tested for obstruction.
obstruction
MLAudioObstruction obstruction;
| Type | Description | 
|---|---|
| MLAudioObstruction | Obstruction 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.