Skip to content

Amplimix

Amplitude Audio Mixer.

Detailed Description

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

See also: Driver

Public Functions

Type Name
virtual const DeviceDescription & GetDeviceDescription () const = 0
Gets the description of the rendering audio device.
virtual bool IsInitialized () const = 0
Checks if the mixer is initialized.
virtual AmUInt64 Mix (AudioBuffer ** outBuffer, AmUInt64 frameCount) = 0
Processes the audio data by mixing multiple audio sources for the specified number of frames.
virtual void SetAfterMixCallback (AfterMixCallback callback) = 0
Sets the callback function to be called after the audio data is mixed.
virtual void UpdateDevice (AmObjectID deviceID, AmString deviceName, AmUInt32 deviceOutputSampleRate, PlaybackOutputChannels deviceOutputChannels, PlaybackOutputFormat deviceOutputFormat) = 0
Saves the information about the rendering audio device.
virtual ~Amplimix () = default
Default Destructor.

Public Functions Documentation

GetDeviceDescription

Gets the description of the rendering audio device.

virtual const DeviceDescription & Amplitude::Amplimix::GetDeviceDescription () const = 0

Returns:

The description of the rendering audio device.

IsInitialized

Checks if the mixer is initialized.

virtual bool Amplitude::Amplimix::IsInitialized () const = 0

Returns:

true if the mixer is initialized, false otherwise.

Mix

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

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

Parameters:

  • outBuffer The buffer to store the mixed audio data.
  • frameCount The number of frames to mix.

Returns:

The number of processed frames.

SetAfterMixCallback

Sets the callback function to be called after the audio data is mixed.

virtual void Amplitude::Amplimix::SetAfterMixCallback (
    AfterMixCallback callback
) = 0

Parameters:

  • callback The callback function.
UpdateDevice

Saves the information about the rendering audio device.

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

Parameters:

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

Default Destructor.

virtual Amplitude::Amplimix::~Amplimix () = default

The documentation for this class was generated from the following file: include/SparkyStudios/Audio/Amplitude/Mixer/Amplimix.h