Description
The custom audio track interface, used to push custom audio data streams.Inheritance
IRTCTrack -> IRTCCustomAudioTrackMethods
Push an audio frame
Returns
Example
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API reference for IRTCCustomAudioTrack, the Windows SRTC custom audio track: push your own encoded audio frames (such as AAC or Opus) with pushAudioFrame. Read when publishing audio from a source other than a microphone.
virtual StatusCode pushAudioFrame(int stmtype, unsigned char* buf, int buf_len, long ts) = 0;
| Parameter | Type | Description |
|---|---|---|
| stmtype | int | Stream type (an encoding type such as AAC or Opus) |
| buf | unsigned char* | Audio frame data buffer |
| buf_len | int | Length of the data buffer |
| ts | long | Timestamp |
| Return value | Description |
|---|---|
| StatusCode | Status code of the operation result |
// Push an Opus audio frame
IRTCCustomAudioTrack* track = nullptr;
channel->getCustomAudioTrack("my_custom_audio", &track); // channel is an IRTCChannel* that has joined
track->pushAudioFrame(0x5355504F, audioData, audioSize, timestamp);