Skip to content

Amplimix

class Amplimix

Amplitude Audio Mixer.

This class handles processing of audio data by mixing multiple audio sources. The resulting audio stream are next handled by the Driver for playback or recording.

See
Driver

Functions

Name Description
~Amplimix Default Destructor.
UpdateDevice Saves the information about the rendering audio device.
IsInitialized Checks if the mixer is initialized.
Mix Processes the audio data by mixing multiple audio sources for the specified number of frames.
GetDeviceDescription Gets the description of the rendering audio device.

Function Details

GetDeviceDescription

[[nodiscard]] virtual const DeviceDescription& GetDeviceDescription() const = 0

Gets the description of the rendering audio device.

Return
The description of the rendering audio device.

IsInitialized

[[nodiscard]] virtual bool IsInitialized() const = 0

Checks if the mixer is initialized.

Return
true if the mixer is initialized, false otherwise.

Mix

virtual AmUInt64 Mix(AudioBuffer** outBuffer, AmUInt64 frameCount) = 0

Processes the audio data by mixing multiple audio sources for the specified number of frames.

Parameter outBuffer
The buffer to store the mixed audio data.
Parameter frameCount
The number of frames to mix.
Return
The number of processed frames.

UpdateDevice

virtual void UpdateDevice( AmObjectID deviceID, AmString deviceName, AmUInt32 deviceOutputSampleRate, PlaybackOutputChannels deviceOutputChannels, PlaybackOutputFormat deviceOutputFormat) = 0

Saves the information about the rendering audio device.

Parameter deviceID
The ID of the audio device.
Parameter deviceName
The name of the audio device.
Parameter deviceOutputSampleRate
The sample rate of the audio device's output.
Parameter deviceOutputChannels
The number of audio channels of the audio device's output.
Parameter deviceOutputFormat
The format of the audio device's output.

~Amplimix

virtual ~Amplimix() = default

Default Destructor.