Java 类org.webrtc.voiceengine.WebRtcAudioRecord 实例源码

项目:DeviceConnect-Android    文件:MediaStream.java   
/**
 * Creates a instance of WebRtcAudioRecord.
 */
private void createAudioCapturer() {
    if (mOption.getAudioType() == PeerOption.AudioType.EXTERNAL_RESOURCE) {
        WebRtcAudioRecord.setAudioRecordModuleFactory(new WebRtcAudioRecordModuleFactory() {
            @Override
            public WebRtcAudioRecordModule create() {
                AudioCapturerExternalResource module = new AudioCapturerExternalResource();
                module.setUri(mOption.getAudioUri());
                module.setSampleRate(mOption.getAudioSampleRate());
                module.setBitDepth(mOption.getAudioBitDepth());
                module.setChannel(mOption.getAudioChannel());
                return module;
            }
        });
    } else {
        WebRtcAudioRecord.setAudioRecordModuleFactory(null);
    }
}