Skip to main content

odin_audio_mix_streams

Reads up to out_buffer_len samples from the given streams and mixes them into the out_buffer. All audio streams will be read based on the sample rate you chose when initializing the ODIN runtime so make sure to allocate the buffer accordingly. After the call the out_buffer_len will contain the amount of samples that have actually been read and mixed into out_buffer.

If enabled this will also apply any audio processing to the output stream and feed back required data to the internal audio processing pipeline which requires a final mix.

Declaration
OdinReturnCode odin_audio_mix_streams(OdinRoomHandle room,
const OdinMediaStreamHandle *streams,
size_t stream_count,
float *out_buffer,
size_t out_buffer_len);

Parameters

room

Handle of the room (see

OdinRoomHandle

) to which the streams belong.

Declaration
OdinRoomHandle room;

streams

Array of handles of the audio streams to be mixed. See

OdinMediaStreamHandle

for more information.

Declaration
const OdinMediaStreamHandle *streams;

stream_count

Number of audio streams to be mixed.

Declaration
size_t stream_count;

out_buffer

Pointer to the buffer where the mixed audio data will be stored.

Declaration
float *out_buffer;

out_buffer_len

Length of the output audio data array.

Declaration
size_t out_buffer_len;

Returns

A return code indicating success or failure.

Return Type
OdinReturnCode