/** * 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); } }