Skip to content

Commit 0e70547

Browse files
authored
Merge pull request #210 from GetStream/add/audio-processing
Add missing ExternalAudioProcessingFactory
2 parents 5f32487 + 6354f36 commit 0e70547

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.webrtc;
2+
3+
public class ExternalAudioProcessingFactory implements AudioProcessingFactory {
4+
5+
private final String libname;
6+
7+
public ExternalAudioProcessingFactory(String libname) {
8+
if (libname == null) {
9+
throw new NullPointerException("libname must not be null.");
10+
}
11+
if (libname.isEmpty()) {
12+
throw new IllegalArgumentException("libname must not be empty.");
13+
}
14+
this.libname = libname;
15+
}
16+
17+
@Override
18+
public long createNative() {
19+
return nativeCreateAudioProcessingModule(libname);
20+
}
21+
22+
public void destroyNative() {
23+
nativeDestroyAudioProcessingModule();
24+
}
25+
26+
private static native long nativeCreateAudioProcessingModule(String libname);
27+
28+
29+
private static native void nativeDestroyAudioProcessingModule();
30+
31+
}

0 commit comments

Comments
 (0)