shenbengit/WebRTCExtension

获取的音频数据一直是[0,0,0,0,0...]

Closed this issue · 0 comments

            JavaAudioDeviceModuleExtKt.setAudioTrackSamplesReadyCallback(audioDeviceModule, audioSamples -> {
                long start = System.currentTimeMillis();
                //音频输出数据,通话时对方数据,原始pcm数据,可以直接录制成pcm文件,再转成mp3
                int audioFormat = audioSamples.getAudioFormat();
                int channelCount = audioSamples.getChannelCount();
                int sampleRate = audioSamples.getSampleRate();
                //pcm格式数据
                byte[] data = audioSamples.getData ();

}

audioFormat ,channelCount ,sampleRate都有数据,pcm data一直回调[0,0,0,0,0...]