Class that sinks audio data from the WebRTC transport layer and feeds it to the provided callback.
More...
#include <AudioSink.h>
|
| AudioSink (AudioSinkCallback onAudioFrameReceived) |
| Construct an AudioStream object. More...
|
|
void | OnData (const void *audioData, int bitsPerSample, int sampleRate, size_t numberOfChannels, size_t numberOfFrames) override |
| Called by the WebRTC transport layer when audio data is available. More...
|
|
Class that sinks audio data from the WebRTC transport layer and feeds it to the provided callback.
◆ AudioSink()
AudioSink::AudioSink |
( |
AudioSinkCallback |
onAudioDataReceived | ) |
|
|
explicit |
Construct an AudioStream object.
- Parameters
-
onAudioDataReceived | callback function to consume audio data received on the WebRTC transport layer |
◆ OnData()
void AudioSink::OnData |
( |
const void * |
audioData, |
|
|
int |
bitsPerSample, |
|
|
int |
sampleRate, |
|
|
size_t |
numberOfChannels, |
|
|
size_t |
numberOfFrames |
|
) |
| |
|
override |
Called by the WebRTC transport layer when audio data is available.
- Parameters
-
audioData | audio data buffer |
bitsPerSample | number of bits per audio sample |
sampleRate | sample rate of the audio data |
numberOfChannels | number of channel of the audio data |
numberOfFrames | number of audio frame in the received data |
The documentation for this class was generated from the following files: