AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AAudioMixer Class Reference

Manages audio players and mixes them into one sound stream. More...

#include <AUI/Audio/AAudioMixer.h>

Public Member Functions#

void addSoundSource (_< IAudioPlayer > s)
 Add new sound source for mixing.
 
void removeSoundSource (const _< IAudioPlayer > &s)
 Remove sound source if it is represented in list of added sound sources, otherwise do nothing.
 
std::size_t readSoundData (std::span< std::byte > destination)
 Write mixed audio data into buffer.
 

Detailed Description#

Warning
This API is experimental. Experimental APIs are likely to contain bugs, might be changed or removed in the future.

Member Function Documentation#

◆ addSoundSource()#

void AAudioMixer::addSoundSource ( _< IAudioPlayer > s)
Parameters
sNew sound source

◆ readSoundData()#

std::size_t AAudioMixer::readSoundData ( std::span< std::byte > destination)
Parameters
destinationPre-allocated buffer to write into
Returns
Number of bytes written

◆ removeSoundSource()#

void AAudioMixer::removeSoundSource ( const _< IAudioPlayer > & s)
Parameters
sSound source to remove