Server Gateway SDK v3.7.200.21 for Linux Java
|
Public Member Functions | |
AgoraAudioPcmDataSender (long cptr) | |
native int | send (byte[] audio_data, int capture_timestamp, int samples_per_channel, int bytes_per_sample, int number_of_channels, int sample_rate) |
void | destroy () |
The AgoraAudioPcmDataSender class.
In scenarios involving custom audio source, you can use the AgoraAudioPcmDataSender
class to send PCM audio data directly to the audio track. If the audio track is disabled, the sent audio data is automatically discarded.
io.agora.rtc.AgoraAudioPcmDataSender.AgoraAudioPcmDataSender | ( | long | cptr | ) |
Constructor.
void io.agora.rtc.AgoraAudioPcmDataSender.destroy | ( | ) |
Destructor.
native int io.agora.rtc.AgoraAudioPcmDataSender.send | ( | byte[] | audio_data, |
int | capture_timestamp, | ||
int | samples_per_channel, | ||
int | bytes_per_sample, | ||
int | number_of_channels, | ||
int | sample_rate | ||
) |
Sends the PCM audio data to the local audio track.
audio_data | The PCM audio data to be sent. |
capture_timestamp | The time (ms) when the audio sample is captured. |
samples_per_channel | The number of audio samples in 10 ms for each audio channel. |
bytes_per_sample | The number of bytes in each sample. |
number_of_channels | The number of audio channels. |
sample_rate | The sample rate (Hz). The minimum value is 8000. |