WebRtc android custom audio input

Viewed 310

I have stream of shorts/bytes of audio the similar as WebRtc gives in JavaAudioDeviceModule.

I want to send it to WebRtc backend. Is the only way to do it to create AudioTrack from it and add to peerConnection? If yes, then how can I feed custom stream to this native c++ pointer? package org.webrtc;

public class AudioTrack extends MediaStreamTrack {
    public AudioTrack(long nativeTrack) {
        super(nativeTrack);
    }

    public void setVolume(double volume) {
        nativeSetVolume(this.getNativeAudioTrack(), volume);
    }

    public long getNativeAudioTrack() {
        return this.getNativeMediaStreamTrack();
    }

    private static native void nativeSetVolume(long var0, double var2);
}
0 Answers
Related