Audio

#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. 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. 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.

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.