File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
stream-webrtc-android/src/main/java/org/webrtc/audio Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ public static class Builder {
5151 private AudioAttributes audioAttributes ;
5252 private boolean useLowLatency ;
5353 private boolean enableVolumeLogger ;
54+ private AudioRecordDataCallback audioRecordDataCallback ;
5455
5556 private Builder (Context context ) {
5657 this .context = context ;
@@ -221,6 +222,16 @@ public Builder setEnableVolumeLogger(boolean enableVolumeLogger) {
221222 return this ;
222223 }
223224
225+ /**
226+ * Can be used to gain access to the raw ByteBuffer from the recording device before it's
227+ * fed into WebRTC. You can use this to manipulate the ByteBuffer (e.g. audio filters).
228+ * Make sure that the operation is fast.
229+ */
230+ public Builder setAudioRecordDataCallback (AudioRecordDataCallback audioRecordDataCallback ) {
231+ this .audioRecordDataCallback = audioRecordDataCallback ;
232+ return this ;
233+ }
234+
224235 /**
225236 * Construct an AudioDeviceModule based on the supplied arguments. The caller takes ownership
226237 * and is responsible for calling release().
You can’t perform that action at this time.
0 commit comments