#include <dolbyio/comms/media_engine/media_engine.h>

The interface for handling incoming audio frames. Applications must set listener which override the virtual function. The handle_audio function is called with the decoded PCM audio data. Inside a conference, the received audio depends on whether or not the conference is using Dolby Voice. When Dolby Voice is enabled, the SDK receives a single audio stream containing mixed audio of all unmuted participants. When Dolby Voice is disabled, the SDK receives separate audio streams from all unmuted participants. The Audio Sink must be provided to the SDK using the Set Audio Sink function and this must be done before starting a conference.

class audio_sink

The interface for receiving audio frames.

Subclassed by dolbyio::comms::plugin::recorder

Public Functions

virtual void handle_audio(const std::string &stream_id, const std::string &track_id, const int16_t *data, size_t n_data, int sample_rate, size_t channels) = 0

The callback that is invoked when an audio frame is decoded and ready to be processed.

  • stream_id – The media stream ID to which the audio track belongs.

  • track_id – The ID of the audio track.

  • data – The pointer to the underlying PCM data.

  • n_data – The size of data.

  • sample_rate – The sample rate

  • channels – The number of channels.

See Example Recorder Implementation for a template for child recording class for all possible media.