[jitsi-dev] [libjitsi-commits] master: Corrects Coreaudio endless loop when CoreAudio daemon underruns. Corrects freeing resources synchronization problem. Corrects AEC memory leak. (d5db661)


#1

Hey Chenzo,

Thanks a lot for committing this! Looking forward to trying it all out!

A quick question: does this need to be activated by a property or anything like that? I still see PortAudio as the only sound system at this point.

Emil

···

On 10.01.14, 18:38, vincent.lucas@gmail.com wrote:

Repository : ssh://lists.jitsi.org/libjitsi

On branch : master
Link : https://github.com/jitsi/libjitsi/compare/eff82560745b07a2f06bb561b923ebfd0a60be78...48020a158b2e5db89dccdd2360aa6357453d2891

---------------------------------------------------------------

commit d5db661f003a990e1b59f75d1e2bf86630857da4
Author: Vincent Lucas <chenzo@jitsi.org>
Date: Fri Jan 10 17:18:55 2014 +0100

     Corrects Coreaudio endless loop when CoreAudio daemon underruns. Corrects freeing resources synchronization problem. Corrects AEC memory leak.

---------------------------------------------------------------

d5db661f003a990e1b59f75d1e2bf86630857da4
  lib/native/mac/libjnmaccoreaudio.jnilib | Bin 92524 -> 92668 bytes
  lib/native/mac/libjnwebrtcaec.dylib | Bin 679632 -> 679632 bytes
  src/native/build.xml | 21 +++
  .../macosx/coreaudio/jni/maccoreaudio_util.c | 6 +-
  .../jni/org_jitsi_impl_neomedia_CoreAudioDevice.h | 77 ---------
  .../org_jitsi_impl_neomedia_MacCoreAudioDevice.h | 127 ---------------
  ...g_jitsi_impl_neomedia_device_CoreAudioDevice.c} | 18 +--
  ...rg_jitsi_impl_neomedia_device_CoreAudioDevice.h | 77 +++++++++
  ...itsi_impl_neomedia_device_MacCoreAudioDevice.c} | 31 ++--
  ...jitsi_impl_neomedia_device_MacCoreAudioDevice.h | 127 +++++++++++++++
  src/native/macosx/coreaudio/lib/device.c | 165 ++++++++++----------
  .../macosx/coreaudio/lib/libjitsi_webrtc_aec.c | 2 +
  .../jni/org_jitsi_impl_neomedia_CoreAudioDevice.h | 77 ---------
  ...g_jitsi_impl_neomedia_device_CoreAudioDevice.c} | 18 +--
  ...rg_jitsi_impl_neomedia_device_CoreAudioDevice.h | 77 +++++++++
  src/org/jitsi/impl/neomedia/device/WebrtcAec.java | 2 +-
  16 files changed, 428 insertions(+), 397 deletions(-)

diff --git a/lib/native/mac/libjnmaccoreaudio.jnilib b/lib/native/mac/libjnmaccoreaudio.jnilib
index b2cd5e1..9e6c2a2 100755
Binary files a/lib/native/mac/libjnmaccoreaudio.jnilib and b/lib/native/mac/libjnmaccoreaudio.jnilib differ
diff --git a/lib/native/mac/libjnwebrtcaec.dylib b/lib/native/mac/libjnwebrtcaec.dylib
index 5e67088..6901e87 100755
Binary files a/lib/native/mac/libjnwebrtcaec.dylib and b/lib/native/mac/libjnwebrtcaec.dylib differ
diff --git a/src/native/build.xml b/src/native/build.xml
index 43d2761..9ec27c5 100644
--- a/src/native/build.xml
+++ b/src/native/build.xml
@@ -943,6 +943,20 @@
        <fileset dir="${src}/native/macosx/coreaudio/jni" includes="*.c"/>
      </cc>

+ <!-- Use "otool -L" to check the changes -->
+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtc.dylib" />
+ <arg value="\{native\_install\_dir\}/libjnwebrtc\.dylib&quot; /&gt; \+ &lt;arg value=&quot;{native_install_dir}/libjnmaccoreaudio.jnilib" />
+ </exec>
+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtcaec.dylib" />
+ <arg value="\{native\_install\_dir\}/libjnwebrtcaec\.dylib&quot; /&gt; \+ &lt;arg value=&quot;{native_install_dir}/libjnmaccoreaudio.jnilib" />
+ </exec>
+
      <delete dir="\{obj\}&quot; failonerror=&quot;false&quot; /&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;delete file=&quot;{native_install_dir}/history.xml" failonerror="false" />
    </target>
@@ -1173,6 +1187,13 @@
              includes="libjitsi_webrtc_aec.c"/>
      </cc>

+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtc.dylib" />
+ <arg value="\{native\_install\_dir\}/libjnwebrtc\.dylib&quot; /&gt; \+ &lt;arg value=&quot;{native_install_dir}/libjnwebrtcaec.dylib" />
+ </exec>
+
      <delete dir="\{obj\}&quot; failonerror=&quot;false&quot; /&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;delete file=&quot;{native_install_dir}/history.xml" failonerror="false" />
    </target>
diff --git a/src/native/macosx/coreaudio/jni/maccoreaudio_util.c b/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
index bab964f..1823b0f 100644
--- a/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
+++ b/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
@@ -103,6 +103,7 @@ jmethodID maccoreaudio_getCallbackMethodID(
                      callbackClass,
                      callbackFunctionName,
                      "([BI)V");
+ (*env)->DeleteLocalRef(env, callbackClass);
          }
      }

@@ -145,6 +146,7 @@ void maccoreaudio_callbackMethod(
          jbyte* bytes = (*env)->GetByteArrayElements(env, bufferBytes, NULL);
          memcpy(buffer, bytes, bufferLength);
          (*env)->ReleaseByteArrayElements(env, bufferBytes, bytes, 0);
+ (*env)->DeleteLocalRef(env, bufferBytes);

          (*maccoreaudio_VM)->DetachCurrentThread(maccoreaudio_VM);
      }
@@ -193,7 +195,7 @@ void maccoreaudio_initHotplug(
          {
              jclass devicesChangedCallbackClass = (*env)->FindClass(
                      env,
- "org/jitsi/impl/neomedia/CoreAudioDevice");
+ "org/jitsi/impl/neomedia/device/CoreAudioDevice");

              if (devicesChangedCallbackClass)
              {
@@ -269,7 +271,7 @@ void maccoreaudio_log(
      {
          jclass clazz = (*env)->FindClass(
                  env,
- "org/jitsi/impl/neomedia/CoreAudioDevice");
+ "org/jitsi/impl/neomedia/device/CoreAudioDevice");
          if (clazz)
          {
              jmethodID methodID
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
deleted file mode 100644
index df7d7a7..0000000
--- a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_CoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: freeDevices
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceModelIdentifierBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceNameBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getInputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getOutputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: initDevices
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setInputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setOutputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h
deleted file mode 100644
index 487a133..0000000
--- a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_MacCoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_MacCoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_MacCoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_jitsi_impl_neomedia_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE
-#define org_jitsi_impl_neomedia_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE 44100.0
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDeviceUIDList
- * Signature: ()[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: isInputDevice
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: isOutputDevice
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getTransportTypeBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getMinimalNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate
- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getMaximalNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate
- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDefaultInputDeviceUIDBytes
- * Signature: ()[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDefaultOutputDeviceUIDBytes
- * Signature: ()[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: startStream
- * Signature: (Ljava/lang/String;Ljava/lang/Object;)J
- */
-JNIEXPORT jlong JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
- (JNIEnv *, jclass, jstring, jobject,
- jfloat sampleRate,
- jint nbChannels,
- jint bitsPerChannel,
- jboolean isFloat,
- jboolean isBigEndian,
- jboolean isNonInterleaved,
- jboolean isInput,
- jboolean isEchoCancel);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: stopStream
- * Signature: (Ljava/lang/String;J)V
- */
-JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_stopStream
- (JNIEnv *, jclass, jstring, jlong);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: countInputChannels
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: countOutputChannels
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countOutputChannels
- (JNIEnv *, jclass, jstring);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
similarity index 81%
rename from src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
rename to src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
index 38022b1..993a781 100644
--- a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
+++ b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_CoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_CoreAudioDevice.h"

  #include "../lib/device.h"
  #include "maccoreaudio_util.h"
@@ -19,21 +19,21 @@
  // Implementation

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
    (JNIEnv *env, jclass clazz)
  {
      return maccoreaudio_initDevices();
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
    (JNIEnv *env, jclass clazz)
  {
      maccoreaudio_freeDevices();
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -47,7 +47,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -63,7 +63,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -75,7 +75,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -87,7 +87,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -99,7 +99,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
new file mode 100644
index 0000000..09bc1d6
--- /dev/null
+++ b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
@@ -0,0 +1,77 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_CoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: freeDevices
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceModelIdentifierBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceNameBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getInputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getOutputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: initDevices
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setInputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setOutputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c
similarity index 87%
rename from src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c
rename to src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c
index 1d6b623..08c069a 100644
--- a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c
+++ b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c
@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_MacCoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h"

  #include "../lib/device.h"
  #include "maccoreaudio_util.h"
@@ -19,7 +19,7 @@
  // Implementation

  JNIEXPORT jobjectArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDeviceUIDList
    (JNIEnv *env, jclass clazz)
  {
      jobjectArray javaDeviceUIDList = NULL;
@@ -55,7 +55,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
  }

  JNIEXPORT jboolean JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isInputDevice
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -67,7 +67,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
  }

  JNIEXPORT jboolean JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isOutputDevice
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -79,7 +79,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getTransportTypeBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -93,7 +93,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getNominalSampleRate
    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean isOutputStream,
     jboolean isEchoCancel)
  {
@@ -109,7 +109,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMinimalNominalSampleRate
    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean isOutputStream,
     jboolean isEchoCancel)
  {
@@ -137,7 +137,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMaximalNominalSampleRate
    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean isOutputStream,
     jboolean isEchoCancel)
  {
@@ -165,7 +165,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes
    (JNIEnv *env, jclass clazz)
  {
      char* defaultInputDeviceUID = maccoreaudio_getDefaultInputDeviceUID();
@@ -178,7 +178,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes
    (JNIEnv *env, jclass clazz)
  {
      char* defaultOutputDeviceUID
@@ -192,7 +192,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes
  }

  JNIEXPORT jlong JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_startStream
    (JNIEnv *env, jclass clazz, jstring deviceUID, jobject callback,
          jfloat sampleRate,
          jint nbChannels,
@@ -253,21 +253,22 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_stopStream
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_stopStream
    (JNIEnv *env, jclass clazz, jstring deviceUID, jlong streamPtr)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
      maccoreaudio_stream * stream = (maccoreaudio_stream*) (long) streamPtr;
+ jobject callbackObject = stream->callbackObject;

      maccoreaudio_stopStream(deviceUIDPtr, stream);

      // Free
+ (*env)->DeleteGlobalRef(env, callbackObject);
      (*env)->ReleaseStringUTFChars(env, deviceUID, deviceUIDPtr);
- (*env)->DeleteGlobalRef(env, stream->callbackObject);
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countInputChannels
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
@@ -279,7 +280,7 @@ Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countOutputChannels
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countOutputChannels
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env, deviceUID, 0);
diff --git a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h
new file mode 100644
index 0000000..2e567c2
--- /dev/null
+++ b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h
@@ -0,0 +1,127 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_MacCoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef org_jitsi_impl_neomedia_device_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE
+#define org_jitsi_impl_neomedia_device_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE 44100.0
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDeviceUIDList
+ * Signature: ()[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDeviceUIDList
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: isInputDevice
+ * Signature: (Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isInputDevice
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: isOutputDevice
+ * Signature: (Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isOutputDevice
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getTransportTypeBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getTransportTypeBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getNominalSampleRate
+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getMinimalNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMinimalNominalSampleRate
+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getMaximalNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMaximalNominalSampleRate
+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDefaultInputDeviceUIDBytes
+ * Signature: ()[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDefaultOutputDeviceUIDBytes
+ * Signature: ()[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: startStream
+ * Signature: (Ljava/lang/String;Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_startStream
+ (JNIEnv *, jclass, jstring, jobject,
+ jfloat sampleRate,
+ jint nbChannels,
+ jint bitsPerChannel,
+ jboolean isFloat,
+ jboolean isBigEndian,
+ jboolean isNonInterleaved,
+ jboolean isInput,
+ jboolean isEchoCancel);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: stopStream
+ * Signature: (Ljava/lang/String;J)V
+ */
+JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_stopStream
+ (JNIEnv *, jclass, jstring, jlong);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: countInputChannels
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countInputChannels
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: countOutputChannels
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countOutputChannels
+ (JNIEnv *, jclass, jstring);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/native/macosx/coreaudio/lib/device.c b/src/native/macosx/coreaudio/lib/device.c
index 3fd9f41..f9e3fa6 100644
--- a/src/native/macosx/coreaudio/lib/device.c
+++ b/src/native/macosx/coreaudio/lib/device.c
@@ -1980,7 +1980,9 @@ OSStatus maccoreaudio_writeOutputStream(
      OSStatus err = noErr;
      int error = 0;

- if(outOutputData->mNumberBuffers == 0)
+ if(outOutputData->mNumberBuffers == 0
+ || outOutputData->mBuffers[0].mData == NULL
+ || outOutputData->mBuffers[0].mDataByteSize == 0)
      {
          return err;
      }
@@ -1988,78 +1990,78 @@ OSStatus maccoreaudio_writeOutputStream(
      maccoreaudio_stream * stream = (maccoreaudio_stream*) inClientData;
      if((error = pthread_mutex_trylock(&stream->mutex)) == 0)
      {
- libjitsi_webrtc_aec_lock(1);
+ if(stream->ioProcId != 0)
+ {
+ libjitsi_webrtc_aec_lock(1);

- void (*callbackFunction) (char*, int, void*, void*)
- = stream->callbackFunction;
+ void (*callbackFunction) (char*, int, void*, void*)
+ = stream->callbackFunction;

- UInt32 tmpSize = sizeof(UInt32);
+ UInt32 tmpSize = sizeof(UInt32);

- UInt32 aecTmpLength = outOutputData->mBuffers[0].mDataByteSize;
- AudioConverterGetProperty(
- stream->outConverter,
- kAudioConverterPropertyCalculateInputBufferSize,
- &tmpSize,
- &aecTmpLength);
+ UInt32 aecTmpLength = outOutputData->mBuffers[0].mDataByteSize;
+ AudioConverterGetProperty(
+ stream->outConverter,
+ kAudioConverterPropertyCalculateInputBufferSize,
+ &tmpSize,
+ &aecTmpLength);

- UInt32 outTmpLength
- = aecTmpLength;
+ UInt32 outTmpLength
+ = aecTmpLength;

- char * aecTmpBuffer;
- if(stream->isAECActivated)
- {
- // Reinit the AEC format to adapt to the capture stream
- AudioStreamBasicDescription tmpFormat;
- if(libjitsi_webrtc_aec_getCaptureFormat(&tmpFormat))
+ char * aecTmpBuffer;
+ if(stream->isAECActivated)
              {
- if(!maccoreaudio_isSameFormat(tmpFormat, stream->aecFormat))
+ // Reinit the AEC format to adapt to the capture stream
+ AudioStreamBasicDescription tmpFormat;
+ if(libjitsi_webrtc_aec_getCaptureFormat(&tmpFormat))
                  {
- if((err = maccoreaudio_freeConverter(stream)) != noErr)
+ if(!maccoreaudio_isSameFormat(tmpFormat, stream->aecFormat))
                      {
- maccoreaudio_log(
+ if((err = maccoreaudio_freeConverter(stream)) != noErr)
+ {
+ maccoreaudio_log(
                              "maccoreaudio_writeOutputStream (coreaudio/device.c):\
- \n\tmaccoreaudio_freeConverter: 0x%x",
- (int) err);
- }
- if((err = maccoreaudio_initConverter(stream)) != noErr)
- {
- maccoreaudio_log(
+ \n\tmaccoreaudio_freeConverter: 0x%x",
+ (int) err);
+ }
+ if((err = maccoreaudio_initConverter(stream)) != noErr)
+ {
+ maccoreaudio_log(
                              "maccoreaudio_writeOutputStream (coreaudio/device.c):\
- \n\tmaccoreaudio_initConverter: 0x%x",
- (int) err);
- pthread_mutex_destroy(&stream->mutex);
- return -1;
+ \n\tmaccoreaudio_initConverter: 0x%x",
+ (int) err);
+ pthread_mutex_destroy(&stream->mutex);
+ return -1;
+ }
                      }
                  }
- }

- libjitsi_webrtc_aec_completeProcess(1);
- if((aecTmpBuffer = (char*) libjitsi_webrtc_aec_getData(
- 1,
- aecTmpLength / sizeof(int16_t)))
- == NULL)
- {
- maccoreaudio_log(
- "maccoreaudio_writeOutputStream (coreaudio/device.c):\
- \n\tlibjitsi_webrtc_aec_getData");
- pthread_mutex_unlock(&stream->mutex);
- return -1;
+ libjitsi_webrtc_aec_completeProcess(1);
+ if((aecTmpBuffer = (char*) libjitsi_webrtc_aec_getData(
+ 1,
+ aecTmpLength / sizeof(int16_t)))
+ == NULL)
+ {
+ maccoreaudio_log(
+ "maccoreaudio_writeOutputStream (coreaudio/device.c):\
+ \n\tlibjitsi_webrtc_aec_getData");
+ pthread_mutex_unlock(&stream->mutex);
+ return -1;
+ }
              }
- }

- AudioConverterGetProperty(
- stream->aecConverter,
- kAudioConverterPropertyCalculateInputBufferSize,
- &tmpSize,
- &outTmpLength);
+ AudioConverterGetProperty(
+ stream->aecConverter,
+ kAudioConverterPropertyCalculateInputBufferSize,
+ &tmpSize,
+ &outTmpLength);

- maccoreaudio_updateBuffer(
- &stream->outBuffer,
- &stream->outBufferLength,
- outTmpLength);
+ maccoreaudio_updateBuffer(
+ &stream->outBuffer,
+ &stream->outBufferLength,
+ outTmpLength);

- if(stream->ioProcId != 0)
- {
              if(stream->isAECActivated)
              {
                  if(maccoreaudio_isSameFormat(
@@ -2813,34 +2815,37 @@ OSStatus maccoreaudio_convert(
  {
      OSStatus err = noErr;

- stream->step = step;
+ if(inBufferLength > 0 && outBufferLength > 0)
+ {
+ stream->step = step;

- stream->audioBuffer.mNumberChannels = inFormat.mChannelsPerFrame;
- stream->audioBuffer.mDataByteSize = inBufferLength;
- stream->audioBuffer.mData = inBuffer;
+ stream->audioBuffer.mNumberChannels = inFormat.mChannelsPerFrame;
+ stream->audioBuffer.mDataByteSize = inBufferLength;
+ stream->audioBuffer.mData = inBuffer;

- UInt32 outputDataPacketSize = outBufferLength / outFormat.mBytesPerPacket;
+ UInt32 outputDataPacketSize = outBufferLength / outFormat.mBytesPerPacket;

- AudioBufferList outBufferList;
- outBufferList.mNumberBuffers = 1;
- outBufferList.mBuffers[0].mNumberChannels = outFormat.mChannelsPerFrame;
- outBufferList.mBuffers[0].mDataByteSize = outBufferLength;
- outBufferList.mBuffers[0].mData = outBuffer;
+ AudioBufferList outBufferList;
+ outBufferList.mNumberBuffers = 1;
+ outBufferList.mBuffers[0].mNumberChannels = outFormat.mChannelsPerFrame;
+ outBufferList.mBuffers[0].mDataByteSize = outBufferLength;
+ outBufferList.mBuffers[0].mData = outBuffer;

- if((err = AudioConverterFillComplexBuffer(
- converter,
- maccoreaudio_converterComplexInputDataProc,
- stream, // corresponding to inUserData
- &outputDataPacketSize,
- &outBufferList,
- NULL))
- != noErr)
- {
- maccoreaudio_log(
- "maccoreaudio_convert (coreaudio/device.c): \
- \n\tAudioConverterFillComplexBuffer: 0x%x",
- (int) err);
- return err;
+ if((err = AudioConverterFillComplexBuffer(
+ converter,
+ maccoreaudio_converterComplexInputDataProc,
+ stream, // corresponding to inUserData
+ &outputDataPacketSize,
+ &outBufferList,
+ NULL))
+ != noErr)
+ {
+ maccoreaudio_log(
+ "maccoreaudio_convert (coreaudio/device.c): \
+ \n\tAudioConverterFillComplexBuffer: 0x%x",
+ (int) err);
+ return err;
+ }
      }

      return err;
diff --git a/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c b/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
index 1d87476..d1f7b94 100644
--- a/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
+++ b/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
@@ -498,6 +498,8 @@ libjitsi_webrtc_aec_process(
      }
      aec->dataProcessed[isRenderStream] = start;

+ delete(frame);
+
      if(init)
      {
          return start;
diff --git a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
deleted file mode 100644
index c02caef..0000000
--- a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_CoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: initDevices
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: freeDevices
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceNameBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceModelIdentifierBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setInputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setOutputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getInputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getOutputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
similarity index 83%
rename from src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
rename to src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
index 68d3704..b56a151 100644
--- a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
+++ b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c
@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_CoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_CoreAudioDevice.h"

  #include "../lib/device.h"

@@ -22,21 +22,21 @@ static jbyteArray getStrBytes(JNIEnv *env, const char *str);
  // Implementation

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
    (JNIEnv *env, jclass clazz)
  {
      return initDevices();
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
    (JNIEnv *env, jclass clazz)
  {
      freeDevices();
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -50,7 +50,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -65,7 +65,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -77,7 +77,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -89,7 +89,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -101,7 +101,7 @@ Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
diff --git a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
new file mode 100644
index 0000000..8a08c97
--- /dev/null
+++ b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
@@ -0,0 +1,77 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_CoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: initDevices
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: freeDevices
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceNameBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceModelIdentifierBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setInputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setOutputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getInputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getOutputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/org/jitsi/impl/neomedia/device/WebrtcAec.java b/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
index 913c6ec..f23778a 100644
--- a/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
+++ b/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
@@ -28,7 +28,7 @@ public class WebrtcAec

      /**
- * Loads CoreAudioDevice if we are using MacOsX or Windows Vista/7/8.
+ * Loads WebrtcAec if we are using MacOsX.
       */
      static
      {

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
https://jitsi.org


#2

Hello Emil,

I had to wait for a libjitsi correction before pushing coreaudio modifications to jitsi. The correction is done via revision "9c56eef1545b868587ee711e1f2fe7c5eea084c8" and I pushed the necessary libraries with revision "66cafbfa9ab8acfa05dbbe1d255bb6ab5e432ab1".

Normally, you just have to wait for the next build.

Regards,
Vincent

···

On 11/01/14 10:38, Emil Ivov wrote:

Hey Chenzo,

Thanks a lot for committing this! Looking forward to trying it all out!

A quick question: does this need to be activated by a property or
anything like that? I still see PortAudio as the only sound system at
this point.

Emil

On 10.01.14, 18:38, vincent.lucas@gmail.com wrote:

Repository : ssh://lists.jitsi.org/libjitsi

On branch : master
Link :
https://github.com/jitsi/libjitsi/compare/eff82560745b07a2f06bb561b923ebfd0a60be78...48020a158b2e5db89dccdd2360aa6357453d2891

---------------------------------------------------------------

commit d5db661f003a990e1b59f75d1e2bf86630857da4
Author: Vincent Lucas <chenzo@jitsi.org>
Date: Fri Jan 10 17:18:55 2014 +0100

     Corrects Coreaudio endless loop when CoreAudio daemon underruns.
Corrects freeing resources synchronization problem. Corrects AEC
memory leak.

---------------------------------------------------------------

d5db661f003a990e1b59f75d1e2bf86630857da4
  lib/native/mac/libjnmaccoreaudio.jnilib | Bin 92524 ->
92668 bytes
  lib/native/mac/libjnwebrtcaec.dylib | Bin 679632 ->
679632 bytes
  src/native/build.xml | 21 +++
  .../macosx/coreaudio/jni/maccoreaudio_util.c | 6 +-
  .../jni/org_jitsi_impl_neomedia_CoreAudioDevice.h | 77 ---------
  .../org_jitsi_impl_neomedia_MacCoreAudioDevice.h | 127
---------------
  ...g_jitsi_impl_neomedia_device_CoreAudioDevice.c} | 18 +--
  ...rg_jitsi_impl_neomedia_device_CoreAudioDevice.h | 77 +++++++++
  ...itsi_impl_neomedia_device_MacCoreAudioDevice.c} | 31 ++--
  ...jitsi_impl_neomedia_device_MacCoreAudioDevice.h | 127
+++++++++++++++
  src/native/macosx/coreaudio/lib/device.c | 165
++++++++++----------
  .../macosx/coreaudio/lib/libjitsi_webrtc_aec.c | 2 +
  .../jni/org_jitsi_impl_neomedia_CoreAudioDevice.h | 77 ---------
  ...g_jitsi_impl_neomedia_device_CoreAudioDevice.c} | 18 +--
  ...rg_jitsi_impl_neomedia_device_CoreAudioDevice.h | 77 +++++++++
  src/org/jitsi/impl/neomedia/device/WebrtcAec.java | 2 +-
  16 files changed, 428 insertions(+), 397 deletions(-)

diff --git a/lib/native/mac/libjnmaccoreaudio.jnilib
b/lib/native/mac/libjnmaccoreaudio.jnilib
index b2cd5e1..9e6c2a2 100755
Binary files a/lib/native/mac/libjnmaccoreaudio.jnilib and
b/lib/native/mac/libjnmaccoreaudio.jnilib differ
diff --git a/lib/native/mac/libjnwebrtcaec.dylib
b/lib/native/mac/libjnwebrtcaec.dylib
index 5e67088..6901e87 100755
Binary files a/lib/native/mac/libjnwebrtcaec.dylib and
b/lib/native/mac/libjnwebrtcaec.dylib differ
diff --git a/src/native/build.xml b/src/native/build.xml
index 43d2761..9ec27c5 100644
--- a/src/native/build.xml
+++ b/src/native/build.xml
@@ -943,6 +943,20 @@
        <fileset dir="${src}/native/macosx/coreaudio/jni"
includes="*.c"/>
      </cc>

+ <!-- Use "otool -L" to check the changes -->
+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtc.dylib" />
+ <arg value="${native_install_dir}/libjnwebrtc.dylib" />
+ <arg value="${native_install_dir}/libjnmaccoreaudio.jnilib" />
+ </exec>
+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtcaec.dylib" />
+ <arg value="${native_install_dir}/libjnwebrtcaec.dylib" />
+ <arg value="${native_install_dir}/libjnmaccoreaudio.jnilib" />
+ </exec>
+
      <delete dir="${obj}" failonerror="false" />
      <delete file="${native_install_dir}/history.xml"
failonerror="false" />
    </target>
@@ -1173,6 +1187,13 @@
              includes="libjitsi_webrtc_aec.c"/>
      </cc>

+ <exec executable="install_name_tool">
+ <arg value="-change" />
+ <arg value="libjnwebrtc.dylib" />
+ <arg value="${native_install_dir}/libjnwebrtc.dylib" />
+ <arg value="${native_install_dir}/libjnwebrtcaec.dylib" />
+ </exec>
+
      <delete dir="${obj}" failonerror="false" />
      <delete file="${native_install_dir}/history.xml"
failonerror="false" />
    </target>
diff --git a/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
b/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
index bab964f..1823b0f 100644
--- a/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
+++ b/src/native/macosx/coreaudio/jni/maccoreaudio_util.c
@@ -103,6 +103,7 @@ jmethodID maccoreaudio_getCallbackMethodID(
                      callbackClass,
                      callbackFunctionName,
                      "([BI)V");
+ (*env)->DeleteLocalRef(env, callbackClass);
          }
      }

@@ -145,6 +146,7 @@ void maccoreaudio_callbackMethod(
          jbyte* bytes = (*env)->GetByteArrayElements(env,
bufferBytes, NULL);
          memcpy(buffer, bytes, bufferLength);
          (*env)->ReleaseByteArrayElements(env, bufferBytes, bytes, 0);
+ (*env)->DeleteLocalRef(env, bufferBytes);

          (*maccoreaudio_VM)->DetachCurrentThread(maccoreaudio_VM);
      }
@@ -193,7 +195,7 @@ void maccoreaudio_initHotplug(
          {
              jclass devicesChangedCallbackClass = (*env)->FindClass(
                      env,
- "org/jitsi/impl/neomedia/CoreAudioDevice");
+ "org/jitsi/impl/neomedia/device/CoreAudioDevice");

              if (devicesChangedCallbackClass)
              {
@@ -269,7 +271,7 @@ void maccoreaudio_log(
      {
          jclass clazz = (*env)->FindClass(
                  env,
- "org/jitsi/impl/neomedia/CoreAudioDevice");
+ "org/jitsi/impl/neomedia/device/CoreAudioDevice");
          if (clazz)
          {
              jmethodID methodID
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h

deleted file mode 100644
index df7d7a7..0000000
---
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h

+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_CoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: freeDevices
- * Signature: ()V
- */
-JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceModelIdentifierBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceNameBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getInputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getOutputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: initDevices
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setInputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setOutputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h

deleted file mode 100644
index 487a133..0000000
---
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.h

+++ /dev/null
@@ -1,127 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_MacCoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_MacCoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_MacCoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_jitsi_impl_neomedia_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE
-#define
org_jitsi_impl_neomedia_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE 44100.0
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDeviceUIDList
- * Signature: ()[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: isInputDevice
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: isOutputDevice
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getTransportTypeBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getMinimalNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate

- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getMaximalNominalSampleRate
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate

- (JNIEnv *, jclass, jstring, jboolean, jboolean);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDefaultInputDeviceUIDBytes
- * Signature: ()[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes

- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: getDefaultOutputDeviceUIDBytes
- * Signature: ()[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes

- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: startStream
- * Signature: (Ljava/lang/String;Ljava/lang/Object;)J
- */
-JNIEXPORT jlong JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
- (JNIEnv *, jclass, jstring, jobject,
- jfloat sampleRate,
- jint nbChannels,
- jint bitsPerChannel,
- jboolean isFloat,
- jboolean isBigEndian,
- jboolean isNonInterleaved,
- jboolean isInput,
- jboolean isEchoCancel);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: stopStream
- * Signature: (Ljava/lang/String;J)V
- */
-JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_stopStream
- (JNIEnv *, jclass, jstring, jlong);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: countInputChannels
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_MacCoreAudioDevice
- * Method: countOutputChannels
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countOutputChannels
- (JNIEnv *, jclass, jstring);
-
-#ifdef __cplusplus
-}
-#endif
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

similarity index 81%
rename from
src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
rename to
src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

index 38022b1..993a781 100644
---
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c

+++
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_CoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_CoreAudioDevice.h"

  #include "../lib/device.h"
  #include "maccoreaudio_util.h"
@@ -19,21 +19,21 @@
  // Implementation

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
    (JNIEnv *env, jclass clazz)
  {
      return maccoreaudio_initDevices();
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
    (JNIEnv *env, jclass clazz)
  {
      maccoreaudio_freeDevices();
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -47,7 +47,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -63,7 +63,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -75,7 +75,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume

    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -87,7 +87,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -99,7 +99,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h

new file mode 100644
index 0000000..09bc1d6
--- /dev/null
+++
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h

@@ -0,0 +1,77 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_CoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: freeDevices
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceModelIdentifierBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes

+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceNameBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getInputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getOutputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: initDevices
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setInputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setOutputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+#ifdef __cplusplus
+}
+#endif
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c

similarity index 87%
rename from
src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c

rename to
src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c

index 1d6b623..08c069a 100644
---
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_MacCoreAudioDevice.c

+++
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.c

@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_MacCoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h"

  #include "../lib/device.h"
  #include "maccoreaudio_util.h"
@@ -19,7 +19,7 @@
  // Implementation

  JNIEXPORT jobjectArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDeviceUIDList
    (JNIEnv *env, jclass clazz)
  {
      jobjectArray javaDeviceUIDList = NULL;
@@ -55,7 +55,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDeviceUIDList
  }

  JNIEXPORT jboolean JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isInputDevice
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -67,7 +67,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isInputDevice
  }

  JNIEXPORT jboolean JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isOutputDevice
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -79,7 +79,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_isOutputDevice
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getTransportTypeBytes

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -93,7 +93,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getTransportTypeBytes
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getNominalSampleRate

    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean
isOutputStream,
     jboolean isEchoCancel)
  {
@@ -109,7 +109,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getNominalSampleRate
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate

+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMinimalNominalSampleRate

    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean
isOutputStream,
     jboolean isEchoCancel)
  {
@@ -137,7 +137,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMinimalNominalSampleRate

  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate

+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMaximalNominalSampleRate

    (JNIEnv *env, jclass clazz, jstring deviceUID, jboolean
isOutputStream,
     jboolean isEchoCancel)
  {
@@ -165,7 +165,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getMaximalNominalSampleRate

  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes

+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes

    (JNIEnv *env, jclass clazz)
  {
      char* defaultInputDeviceUID =
maccoreaudio_getDefaultInputDeviceUID();
@@ -178,7 +178,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes

  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes

+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes

    (JNIEnv *env, jclass clazz)
  {
      char* defaultOutputDeviceUID
@@ -192,7 +192,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes

  }

  JNIEXPORT jlong JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_startStream
    (JNIEnv *env, jclass clazz, jstring deviceUID, jobject callback,
          jfloat sampleRate,
          jint nbChannels,
@@ -253,21 +253,22 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_startStream
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_stopStream
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_stopStream
    (JNIEnv *env, jclass clazz, jstring deviceUID, jlong streamPtr)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
      maccoreaudio_stream * stream = (maccoreaudio_stream*) (long)
streamPtr;
+ jobject callbackObject = stream->callbackObject;

      maccoreaudio_stopStream(deviceUIDPtr, stream);

      // Free
+ (*env)->DeleteGlobalRef(env, callbackObject);
      (*env)->ReleaseStringUTFChars(env, deviceUID, deviceUIDPtr);
- (*env)->DeleteGlobalRef(env, stream->callbackObject);
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countInputChannels

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
@@ -279,7 +280,7 @@
Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countInputChannels
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_MacCoreAudioDevice_countOutputChannels
+Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countOutputChannels

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = (*env)->GetStringUTFChars(env,
deviceUID, 0);
diff --git
a/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h

new file mode 100644
index 0000000..2e567c2
--- /dev/null
+++
b/src/native/macosx/coreaudio/jni/org_jitsi_impl_neomedia_device_MacCoreAudioDevice.h

@@ -0,0 +1,127 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_MacCoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef
org_jitsi_impl_neomedia_device_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE
+#define
org_jitsi_impl_neomedia_device_MacCoreAudioDevice_DEFAULT_SAMPLE_RATE
44100.0
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDeviceUIDList
+ * Signature: ()[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDeviceUIDList
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: isInputDevice
+ * Signature: (Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isInputDevice
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: isOutputDevice
+ * Signature: (Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_isOutputDevice
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getTransportTypeBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getTransportTypeBytes

+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getNominalSampleRate

+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getMinimalNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMinimalNominalSampleRate

+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getMaximalNominalSampleRate
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getMaximalNominalSampleRate

+ (JNIEnv *, jclass, jstring, jboolean, jboolean);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDefaultInputDeviceUIDBytes
+ * Signature: ()[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultInputDeviceUIDBytes

+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: getDefaultOutputDeviceUIDBytes
+ * Signature: ()[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_getDefaultOutputDeviceUIDBytes

+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: startStream
+ * Signature: (Ljava/lang/String;Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_startStream
+ (JNIEnv *, jclass, jstring, jobject,
+ jfloat sampleRate,
+ jint nbChannels,
+ jint bitsPerChannel,
+ jboolean isFloat,
+ jboolean isBigEndian,
+ jboolean isNonInterleaved,
+ jboolean isInput,
+ jboolean isEchoCancel);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: stopStream
+ * Signature: (Ljava/lang/String;J)V
+ */
+JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_stopStream
+ (JNIEnv *, jclass, jstring, jlong);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: countInputChannels
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countInputChannels
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_MacCoreAudioDevice
+ * Method: countOutputChannels
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_MacCoreAudioDevice_countOutputChannels

+ (JNIEnv *, jclass, jstring);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/native/macosx/coreaudio/lib/device.c
b/src/native/macosx/coreaudio/lib/device.c
index 3fd9f41..f9e3fa6 100644
--- a/src/native/macosx/coreaudio/lib/device.c
+++ b/src/native/macosx/coreaudio/lib/device.c
@@ -1980,7 +1980,9 @@ OSStatus maccoreaudio_writeOutputStream(
      OSStatus err = noErr;
      int error = 0;

- if(outOutputData->mNumberBuffers == 0)
+ if(outOutputData->mNumberBuffers == 0
+ || outOutputData->mBuffers[0].mData == NULL
+ || outOutputData->mBuffers[0].mDataByteSize == 0)
      {
          return err;
      }
@@ -1988,78 +1990,78 @@ OSStatus maccoreaudio_writeOutputStream(
      maccoreaudio_stream * stream = (maccoreaudio_stream*) inClientData;
      if((error = pthread_mutex_trylock(&stream->mutex)) == 0)
      {
- libjitsi_webrtc_aec_lock(1);
+ if(stream->ioProcId != 0)
+ {
+ libjitsi_webrtc_aec_lock(1);

- void (*callbackFunction) (char*, int, void*, void*)
- = stream->callbackFunction;
+ void (*callbackFunction) (char*, int, void*, void*)
+ = stream->callbackFunction;

- UInt32 tmpSize = sizeof(UInt32);
+ UInt32 tmpSize = sizeof(UInt32);

- UInt32 aecTmpLength = outOutputData->mBuffers[0].mDataByteSize;
- AudioConverterGetProperty(
- stream->outConverter,
- kAudioConverterPropertyCalculateInputBufferSize,
- &tmpSize,
- &aecTmpLength);
+ UInt32 aecTmpLength =
outOutputData->mBuffers[0].mDataByteSize;
+ AudioConverterGetProperty(
+ stream->outConverter,
+ kAudioConverterPropertyCalculateInputBufferSize,
+ &tmpSize,
+ &aecTmpLength);

- UInt32 outTmpLength
- = aecTmpLength;
+ UInt32 outTmpLength
+ = aecTmpLength;

- char * aecTmpBuffer;
- if(stream->isAECActivated)
- {
- // Reinit the AEC format to adapt to the capture stream
- AudioStreamBasicDescription tmpFormat;
- if(libjitsi_webrtc_aec_getCaptureFormat(&tmpFormat))
+ char * aecTmpBuffer;
+ if(stream->isAECActivated)
              {
- if(!maccoreaudio_isSameFormat(tmpFormat,
stream->aecFormat))
+ // Reinit the AEC format to adapt to the capture stream
+ AudioStreamBasicDescription tmpFormat;
+ if(libjitsi_webrtc_aec_getCaptureFormat(&tmpFormat))
                  {
- if((err = maccoreaudio_freeConverter(stream)) !=
noErr)
+ if(!maccoreaudio_isSameFormat(tmpFormat,
stream->aecFormat))
                      {
- maccoreaudio_log(
+ if((err = maccoreaudio_freeConverter(stream))
!= noErr)
+ {
+ maccoreaudio_log(
                              "maccoreaudio_writeOutputStream
(coreaudio/device.c):\
- \n\tmaccoreaudio_freeConverter: 0x%x",
- (int) err);
- }
- if((err = maccoreaudio_initConverter(stream)) !=
noErr)
- {
- maccoreaudio_log(
+ \n\tmaccoreaudio_freeConverter:
0x%x",
+ (int) err);
+ }
+ if((err = maccoreaudio_initConverter(stream))
!= noErr)
+ {
+ maccoreaudio_log(
                              "maccoreaudio_writeOutputStream
(coreaudio/device.c):\
- \n\tmaccoreaudio_initConverter: 0x%x",
- (int) err);
- pthread_mutex_destroy(&stream->mutex);
- return -1;
+ \n\tmaccoreaudio_initConverter:
0x%x",
+ (int) err);
+ pthread_mutex_destroy(&stream->mutex);
+ return -1;
+ }
                      }
                  }
- }

- libjitsi_webrtc_aec_completeProcess(1);
- if((aecTmpBuffer = (char*) libjitsi_webrtc_aec_getData(
- 1,
- aecTmpLength / sizeof(int16_t)))
- == NULL)
- {
- maccoreaudio_log(
- "maccoreaudio_writeOutputStream
(coreaudio/device.c):\
- \n\tlibjitsi_webrtc_aec_getData");
- pthread_mutex_unlock(&stream->mutex);
- return -1;
+ libjitsi_webrtc_aec_completeProcess(1);
+ if((aecTmpBuffer = (char*) libjitsi_webrtc_aec_getData(
+ 1,
+ aecTmpLength / sizeof(int16_t)))
+ == NULL)
+ {
+ maccoreaudio_log(
+ "maccoreaudio_writeOutputStream
(coreaudio/device.c):\
+ \n\tlibjitsi_webrtc_aec_getData");
+ pthread_mutex_unlock(&stream->mutex);
+ return -1;
+ }
              }
- }

- AudioConverterGetProperty(
- stream->aecConverter,
- kAudioConverterPropertyCalculateInputBufferSize,
- &tmpSize,
- &outTmpLength);
+ AudioConverterGetProperty(
+ stream->aecConverter,
+ kAudioConverterPropertyCalculateInputBufferSize,
+ &tmpSize,
+ &outTmpLength);

- maccoreaudio_updateBuffer(
- &stream->outBuffer,
- &stream->outBufferLength,
- outTmpLength);
+ maccoreaudio_updateBuffer(
+ &stream->outBuffer,
+ &stream->outBufferLength,
+ outTmpLength);

- if(stream->ioProcId != 0)
- {
              if(stream->isAECActivated)
              {
                  if(maccoreaudio_isSameFormat(
@@ -2813,34 +2815,37 @@ OSStatus maccoreaudio_convert(
  {
      OSStatus err = noErr;

- stream->step = step;
+ if(inBufferLength > 0 && outBufferLength > 0)
+ {
+ stream->step = step;

- stream->audioBuffer.mNumberChannels = inFormat.mChannelsPerFrame;
- stream->audioBuffer.mDataByteSize = inBufferLength;
- stream->audioBuffer.mData = inBuffer;
+ stream->audioBuffer.mNumberChannels =
inFormat.mChannelsPerFrame;
+ stream->audioBuffer.mDataByteSize = inBufferLength;
+ stream->audioBuffer.mData = inBuffer;

- UInt32 outputDataPacketSize = outBufferLength /
outFormat.mBytesPerPacket;
+ UInt32 outputDataPacketSize = outBufferLength /
outFormat.mBytesPerPacket;

- AudioBufferList outBufferList;
- outBufferList.mNumberBuffers = 1;
- outBufferList.mBuffers[0].mNumberChannels =
outFormat.mChannelsPerFrame;
- outBufferList.mBuffers[0].mDataByteSize = outBufferLength;
- outBufferList.mBuffers[0].mData = outBuffer;
+ AudioBufferList outBufferList;
+ outBufferList.mNumberBuffers = 1;
+ outBufferList.mBuffers[0].mNumberChannels =
outFormat.mChannelsPerFrame;
+ outBufferList.mBuffers[0].mDataByteSize = outBufferLength;
+ outBufferList.mBuffers[0].mData = outBuffer;

- if((err = AudioConverterFillComplexBuffer(
- converter,
- maccoreaudio_converterComplexInputDataProc,
- stream, // corresponding to inUserData
- &outputDataPacketSize,
- &outBufferList,
- NULL))
- != noErr)
- {
- maccoreaudio_log(
- "maccoreaudio_convert (coreaudio/device.c): \
- \n\tAudioConverterFillComplexBuffer: 0x%x",
- (int) err);
- return err;
+ if((err = AudioConverterFillComplexBuffer(
+ converter,
+ maccoreaudio_converterComplexInputDataProc,
+ stream, // corresponding to inUserData
+ &outputDataPacketSize,
+ &outBufferList,
+ NULL))
+ != noErr)
+ {
+ maccoreaudio_log(
+ "maccoreaudio_convert (coreaudio/device.c): \
+ \n\tAudioConverterFillComplexBuffer: 0x%x",
+ (int) err);
+ return err;
+ }
      }

      return err;
diff --git a/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
b/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
index 1d87476..d1f7b94 100644
--- a/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
+++ b/src/native/macosx/coreaudio/lib/libjitsi_webrtc_aec.c
@@ -498,6 +498,8 @@ libjitsi_webrtc_aec_process(
      }
      aec->dataProcessed[isRenderStream] = start;

+ delete(frame);
+
      if(init)
      {
          return start;
diff --git
a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h
b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h

deleted file mode 100644
index c02caef..0000000
---
a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.h

+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_jitsi_impl_neomedia_CoreAudioDevice */
-
-#ifndef _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#define _Included_org_jitsi_impl_neomedia_CoreAudioDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: initDevices
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: freeDevices
- * Signature: ()V
- */
-JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
- (JNIEnv *, jclass);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceNameBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getDeviceModelIdentifierBytes
- * Signature: (Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setInputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: setOutputDeviceVolume
- * Signature: (Ljava/lang/String;F)I
- */
-JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
- (JNIEnv *, jclass, jstring, jfloat);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getInputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-/*
- * Class: org_jitsi_impl_neomedia_CoreAudioDevice
- * Method: getOutputDeviceVolume
- * Signature: (Ljava/lang/String;)F
- */
-JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
- (JNIEnv *, jclass, jstring);
-
-#ifdef __cplusplus
-}
-#endif
diff --git
a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c
b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

similarity index 83%
rename from
src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c

rename to
src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

index 68d3704..b56a151 100644
---
a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_CoreAudioDevice.c

+++
b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.c

@@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */

-#include "org_jitsi_impl_neomedia_CoreAudioDevice.h"
+#include "org_jitsi_impl_neomedia_device_CoreAudioDevice.h"

  #include "../lib/device.h"

@@ -22,21 +22,21 @@ static jbyteArray getStrBytes(JNIEnv *env, const
char *str);
  // Implementation

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_initDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
    (JNIEnv *env, jclass clazz)
  {
      return initDevices();
  }

  JNIEXPORT void JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_freeDevices
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
    (JNIEnv *env, jclass clazz)
  {
      freeDevices();
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -50,7 +50,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceNameBytes
  }

  JNIEXPORT jbyteArray JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -65,7 +65,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getDeviceModelIdentifierBytes

  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -77,7 +77,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setInputDeviceVolume
  }

  JNIEXPORT jint JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume

    (JNIEnv *env, jclass clazz, jstring deviceUID, jfloat volume)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -89,7 +89,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_setOutputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
@@ -101,7 +101,7 @@
Java_org_jitsi_impl_neomedia_CoreAudioDevice_getInputDeviceVolume
  }

  JNIEXPORT jfloat JNICALL
-Java_org_jitsi_impl_neomedia_CoreAudioDevice_getOutputDeviceVolume
+Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume

    (JNIEnv *env, jclass clazz, jstring deviceUID)
  {
      const char * deviceUIDPtr = env->GetStringUTFChars(deviceUID, 0);
diff --git
a/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h
b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h

new file mode 100644
index 0000000..8a08c97
--- /dev/null
+++
b/src/native/windows/coreaudio/jni/org_jitsi_impl_neomedia_device_CoreAudioDevice.h

@@ -0,0 +1,77 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_jitsi_impl_neomedia_device_CoreAudioDevice */
+
+#ifndef _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#define _Included_org_jitsi_impl_neomedia_device_CoreAudioDevice
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: initDevices
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_initDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: freeDevices
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_freeDevices
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceNameBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceNameBytes
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getDeviceModelIdentifierBytes
+ * Signature: (Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getDeviceModelIdentifierBytes

+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setInputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setInputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: setOutputDeviceVolume
+ * Signature: (Ljava/lang/String;F)I
+ */
+JNIEXPORT jint JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_setOutputDeviceVolume
+ (JNIEnv *, jclass, jstring, jfloat);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getInputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getInputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+/*
+ * Class: org_jitsi_impl_neomedia_device_CoreAudioDevice
+ * Method: getOutputDeviceVolume
+ * Signature: (Ljava/lang/String;)F
+ */
+JNIEXPORT jfloat JNICALL
Java_org_jitsi_impl_neomedia_device_CoreAudioDevice_getOutputDeviceVolume
+ (JNIEnv *, jclass, jstring);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
b/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
index 913c6ec..f23778a 100644
--- a/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
+++ b/src/org/jitsi/impl/neomedia/device/WebrtcAec.java
@@ -28,7 +28,7 @@ public class WebrtcAec

      /**
- * Loads CoreAudioDevice if we are using MacOsX or Windows
Vista/7/8.
+ * Loads WebrtcAec if we are using MacOsX.
       */
      static
      {

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits

--
Vincent Lucas, Ph.D. Jitsi developer
chenzo@jitsi.org http://jitsi.org