Exemple #1
0
        public byte[] Capture(byte[] inputData, int inputIndex, int inputLength)
        {
            IntPtr inputDataPtr = JNIEnv.NewArray(inputData);

            try
            {
                return((byte[])JNIEnv.GetArray(AudioProcessingLibrary.Java_aaudioprocessing_AudioProcessingLibrary_acousticEchoCancellerCapture(JNIEnv.Handle, IntPtr.Zero, State, inputDataPtr, inputIndex, inputLength), JniHandleOwnership.DoNotTransfer, typeof(byte)));
            }
            finally
            {
                JNIEnv.DeleteLocalRef(inputDataPtr);
            }
        }
Exemple #2
0
        public void Render(byte[] echoData, int echoIndex, int echoLength)
        {
            IntPtr echoDataPtr = JNIEnv.NewArray(echoData);

            try
            {
                AudioProcessingLibrary.Java_aaudioprocessing_AudioProcessingLibrary_acousticEchoCancellerRender(JNIEnv.Handle, IntPtr.Zero, State, echoDataPtr, echoIndex, echoLength);
            }
            finally
            {
                JNIEnv.DeleteLocalRef(echoDataPtr);
            }
        }
Exemple #3
0
 public void Dispose()
 {
     AudioProcessingLibrary.Java_aaudioprocessing_AudioProcessingLibrary_acousticEchoCancellerDestroy(JNIEnv.Handle, IntPtr.Zero, State);
 }
Exemple #4
0
 public AcousticEchoCanceller(int clockRate, int channels, int tailLength)
 {
     State = AudioProcessingLibrary.Java_aaudioprocessing_AudioProcessingLibrary_acousticEchoCancellerCreate(JNIEnv.Handle, IntPtr.Zero, clockRate, channels, tailLength);
 }