rtc_audio_source

🚀

SDK Beta

This interface is a part of the Beta program.

Module: Media Injector API

The adapter which is used for providing Audio frames into WebRTC. This interface is an Audio Sink from the perspective of the Injector. It is an Audio Source from the perspective of WebRTC Audio Tracks, thus it provides this connection in establishing the audio injection pipeline.

This interface is NOT implemented by the injector, it is used to be the injector to provide audio frames.

#include <media_engine.h>

Public Functions

Name
virtual voidon_data(const void * audio_data, int bits_per_sample, int sample_rate, size_t number_of_channels, size_t number_of_frames) =0
The callback that is invoked when 10ms of audio data is ready to be passed to webrtc.
class dolbyio::comms::rtc_audio_source;

Public Functions Documentation

function on_data

virtual void on_data(
    const void * audio_data,
    int bits_per_sample,
    int sample_rate,
    size_t number_of_channels,
    size_t number_of_frames
) =0

The callback that is invoked when 10ms of audio data is ready to be passed to webrtc.

Parameters:

  • audio_data The pointer to the PCM data
  • bits_per_sample Bits per sample.
  • sample_rate The sample rate of the audio.
  • number_of_channels The number of channels.
  • number_of_frames The total number of samples (channels * sample_rate/100)


Did this page help you?