1

Is there any way that I can do to get audioTrack from this pointer ?

I want to get real stream with ByteBuffer or something similar without forking webrtc

package org.webrtc;
public class AudioTrack extends MediaStreamTrack {
  /** Returns a pointer to webrtc::AudioTrackInterface. */
  long getNativeAudioTrack() {
    return getNativeMediaStreamTrack();
  }
}
Kyryl Zotov
  • 1,788
  • 5
  • 24
  • 44

2 Answers2

1

Try this

if(Stream_object.audioTracks.size() > 0){
    Stream_object.audioTracks.get(0);
    audioTrack.setEnabled(true);
}
1

If you are looking for audio byte buffers that are captured by webrtc from the microphone, then implement SamplesReadyCallback callback in JavaAudioDeviceModule. AudioSamples has the byte buffer data that is captured by webrtc

public static interface SamplesReadyCallback {
    void onWebRtcAudioRecordSamplesReady(AudioSamples samples);
  }
Pratim
  • 189
  • 1
  • 6