public static interface TXLivePlayer.ITXAudioRawDataListener
Modifier and Type | Method and Description |
---|---|
void |
onAudioInfoChanged(int sampleRate,
int channels,
int bits)
音频播放信息回调
|
void |
onPcmDataAvailable(byte[] buf,
long timestamp)
音频播放数据回调,数据格式 :PCM
|
void onAudioInfoChanged(int sampleRate, int channels, int bits)
sampleRate
- 采样率channels
- 声道数bits
- 采样点大小void onPcmDataAvailable(byte[] buf, long timestamp)
<!!!注意!!!> 该函数内不要做耗时操作<!!!注意!!!>
音频播放器会在播放数据的前一刻,调用此函数,同步回调将要播放的数据。因此在函数内部做耗时操作可能会影响播放
>
buf
- pcm数据timestamp
- 时间戳