@sbhjt-gr/react-native-webrtc 137.0.6 → 137.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/src/main/java/com/oney/WebRTCModule/virtualaudio/VirtualAudioController.java
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
package com.oney.WebRTCModule.virtualaudio;
|
|
2
2
|
|
|
3
|
-
import org.webrtc.audio.WebRtcAudioRecord;
|
|
4
|
-
|
|
5
3
|
import java.lang.reflect.Field;
|
|
6
4
|
import java.lang.reflect.InvocationTargetException;
|
|
7
5
|
import java.lang.reflect.Method;
|
|
@@ -10,7 +8,7 @@ import java.nio.ByteOrder;
|
|
|
10
8
|
import java.nio.ShortBuffer;
|
|
11
9
|
|
|
12
10
|
public class VirtualAudioController {
|
|
13
|
-
private final
|
|
11
|
+
private final Object audioRecord;
|
|
14
12
|
private final Method nativeDataIsRecorded;
|
|
15
13
|
private final Method nativeCacheDirectBufferAddress;
|
|
16
14
|
private final Field nativeAudioRecordField;
|
|
@@ -25,7 +23,7 @@ public class VirtualAudioController {
|
|
|
25
23
|
private int currentSampleRate;
|
|
26
24
|
private int currentChannels;
|
|
27
25
|
|
|
28
|
-
public VirtualAudioController(
|
|
26
|
+
public VirtualAudioController(Object audioRecord) {
|
|
29
27
|
this.audioRecord = audioRecord;
|
|
30
28
|
try {
|
|
31
29
|
Class<?> clazz = audioRecord.getClass();
|