diff --git a/src/org/jitsi/impl/neomedia/codec/audio/opus/JNIEncoder.java b/src/org/jitsi/impl/neomedia/codec/audio/opus/JNIEncoder.java index efff0b889bc88899f059cb8724e849801df27246..384a071edfdeb9342468317129f36ed7cf04d786 100644 --- a/src/org/jitsi/impl/neomedia/codec/audio/opus/JNIEncoder.java +++ b/src/org/jitsi/impl/neomedia/codec/audio/opus/JNIEncoder.java @@ -87,7 +87,8 @@ public class JNIEncoder int supportedInputCount = SUPPORTED_INPUT_SAMPLE_RATES.length; - SUPPORTED_INPUT_FORMATS = new Format[supportedInputCount*2]; + SUPPORTED_INPUT_FORMATS = new Format[supportedInputCount]; + //SUPPORTED_INPUT_FORMATS = new Format[supportedInputCount*2]; for (int i = 0; i < supportedInputCount; i++) { SUPPORTED_INPUT_FORMATS[i] @@ -102,20 +103,26 @@ public class JNIEncoder /* frameRate */ Format.NOT_SPECIFIED, Format.byteArray); } - for (int i = 0; i < supportedInputCount; i++) - { - SUPPORTED_INPUT_FORMATS[i+supportedInputCount] - = new AudioFormat( - AudioFormat.LINEAR, - SUPPORTED_INPUT_SAMPLE_RATES[i], - 16, - 2, - AudioFormat.LITTLE_ENDIAN, - AudioFormat.SIGNED, - /* frameSizeInBits */ Format.NOT_SPECIFIED, - /* frameRate */ Format.NOT_SPECIFIED, - Format.byteArray); - } + /* + * Using stereo input formats leads to problems (at least when used with + * pulse audio). It is unclear whether they are rooted in this encoder + * or somewhere else in the code. So stereo input formats are disabled + * until we make sure that they work properly. + */ + //for (int i = 0; i < supportedInputCount; i++) + //{ + // SUPPORTED_INPUT_FORMATS[i+supportedInputCount] + // = new AudioFormat( + // AudioFormat.LINEAR, + // SUPPORTED_INPUT_SAMPLE_RATES[i], + // 16, + // 2, + // AudioFormat.LITTLE_ENDIAN, + // AudioFormat.SIGNED, + // /* frameSizeInBits */ Format.NOT_SPECIFIED, + // /* frameRate */ Format.NOT_SPECIFIED, + // Format.byteArray); + //} } /**