PushAudioFrame 无效

在Hello-Unity3D-Agora的基础上,使用PushAudioFrame的功能

  1. 在joinchannel 之前,调用 mRtcEngine.SetExternalAudioSource(true, 48000, 2);
  2. 之后每一帧(update),调用PushAudioFrame,返回值是0
  3. 接收方无声音

需求:可以出一个example么?

ps:

        AudioFrame audioFrame = new AudioFrame();
        audioFrame.type = 0;
        audioFrame.samples = 1024;
        audioFrame.bytesPerSample = 2;
        audioFrame.channels = 2;
        audioFrame.buffer = GetAudioData();
        audioFrame.samplesPerSec = 48000;
        audioFrame.renderTimeMs = clipCount;

       mRtcEngine.PushAudioFrame(audioFrame);

请参考:https://docs.agora.io/cn/Interactive%20Broadcast/custom_audio_unity?platform=Unity#实现方法

已经参考了,仍然有异常,所以才发帖求助的~

有unity-API Example demo: Agora-Unity-Quickstart/API-Example-Unity at master · AgoraIO/Agora-Unity-Quickstart · GitHub 可以看下