public interface IAVChatRemoteAudioCallBack
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onAudioFrame(java.lang.String account,
AudioFrame audioFrame)
远端用户 pcm 音频回调
注意 :此回调是同步回调,并且数据只能读不能修改,一定要先拷贝有效数据( 回调结束后,原始的AudioFrame可能会被SDK复用修改 ),再投递到子线程去
{@code int len = audioFrame.getChannels() * audioFrame.getSamplesPerChannel() * audioFrame.getBytesPerSample(); byte[] bytes = new byte[len]; audioFrame.getData().get(bytes, 0, len); backgroundHandler.post(new Runnable() { |
void onAudioFrame(java.lang.String account,
AudioFrame audioFrame)
{@code
int len = audioFrame.getChannels() * audioFrame.getSamplesPerChannel() * audioFrame.getBytesPerSample();
byte[] bytes = new byte[len];
audioFrame.getData().get(bytes, 0, len);
backgroundHandler.post(new Runnable() {account - 用户accountaudioFrame - 音频数据