Audio Sink Interface

#include <dolbyio/comms/media/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. When inside a conference the C++ SDK will receive a single audio stream which contains the mixed audio of all unmuted participants within that conference.

class dolbyio::comms::audio_sink

The interface for receiving audio frames.

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.

Parameters:
  • 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.