Skip to content

Commit 5cca5a0

Browse files
authored
Merge pull request #239 from GetStream/add/setAudioRecordDataCallback
Add missing setAudioRecordDataCallback method
2 parents 274d65b + 67cec93 commit 5cca5a0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

stream-webrtc-android/src/main/java/org/webrtc/audio/JavaAudioDeviceModule.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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().

0 commit comments

Comments
 (0)