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.
Returns:
The description of the rendering audio device.
IsInitialized
Checks if the mixer is initialized.
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.
Parameters:
-
outBufferThe buffer to store the mixed audio data. -
frameCountThe 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.
Parameters:
-
callbackThe 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:
-
deviceIDThe ID of the audio device. -
deviceNameThe name of the audio device. -
deviceOutputSampleRateThe sample rate of the audio device's output. -
deviceOutputChannelsThe number of audio channels for the audio device's output. -
deviceOutputFormatThe format of the audio device's output.
The documentation for this class was generated from the following file: include/SparkyStudios/Audio/Amplitude/Mixer/Amplimix.h