diff options
author | Andrew Comminos <andrewcomminos@gmail.com> | 2013-10-11 04:17:37 +0400 |
---|---|---|
committer | Andrew Comminos <andrewcomminos@gmail.com> | 2013-10-11 04:17:37 +0400 |
commit | e8d00f00917b7d7c4ea63f6b8dc4c3caa5c9dc76 (patch) | |
tree | ab4dde0bd9b21f936b983f1ee0fc98047a9b395b /src/main | |
parent | 076a7fefe5eed9f432292d4e3d0fdd29b95ed6ad (diff) |
Working Tor support with orbot, a bunch of audio fixes and various
protocol changes. Test suite temporarily broken.
Diffstat (limited to 'src/main')
54 files changed, 466 insertions, 219 deletions
diff --git a/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl b/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl index 7ba3594..78b6d61 100644 --- a/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl +++ b/src/main/aidl/com/morlunk/jumble/IJumbleService.aidl @@ -24,6 +24,7 @@ import com.morlunk.jumble.IJumbleObserver; interface IJumbleService { void disconnect(); boolean isConnected(); + boolean isConnecting(); // Session and users int getSession(); @@ -59,6 +60,7 @@ interface IJumbleService { void sendUserTextMessage(int session, String message); void sendChannelTextMessage(int channel, String message, boolean tree); void setUserComment(int session, String comment); + void setPrioritySpeaker(int session, boolean priority); void removeChannel(int channel); //void addChannelLink(int channel, int link); //void requestChannelPermissions(int channel); diff --git a/src/main/java/com/morlunk/jumble/JumbleService.java b/src/main/java/com/morlunk/jumble/JumbleService.java index 24138ee..0526a84 100644 --- a/src/main/java/com/morlunk/jumble/JumbleService.java +++ b/src/main/java/com/morlunk/jumble/JumbleService.java @@ -117,13 +117,18 @@ public class JumbleService extends Service implements JumbleConnection.JumbleCon } @Override + public boolean isConnecting() throws RemoteException { + return mConnection != null && !mConnection.isConnected(); + } + + @Override public int getSession() throws RemoteException { return mConnection.getSession(); } @Override public User getSessionUser() throws RemoteException { - return mUserHandler.getUser(getSession()); + return mUserHandler != null ? mUserHandler.getUser(getSession()) : null; } @Override @@ -300,6 +305,14 @@ public class JumbleService extends Service implements JumbleConnection.JumbleCon } @Override + public void setPrioritySpeaker(int session, boolean priority) throws RemoteException { + Mumble.UserState.Builder usb = Mumble.UserState.newBuilder(); + usb.setSession(session); + usb.setPrioritySpeaker(priority); + mConnection.sendTCPMessage(usb.build(), JumbleTCPMessageType.UserState); + } + + @Override public void removeChannel(int channel) throws RemoteException { Mumble.ChannelRemove.Builder crb = Mumble.ChannelRemove.newBuilder(); crb.setChannelId(channel); @@ -422,7 +435,7 @@ public class JumbleService extends Service implements JumbleConnection.JumbleCon } public boolean isConnected() { - return mConnection.isConnected(); + return mConnection != null ? mConnection.isConnected() : false; } @Override diff --git a/src/main/java/com/morlunk/jumble/audio/AudioInput.java b/src/main/java/com/morlunk/jumble/audio/AudioInput.java index 9391c08..f43e621 100644 --- a/src/main/java/com/morlunk/jumble/audio/AudioInput.java +++ b/src/main/java/com/morlunk/jumble/audio/AudioInput.java @@ -16,38 +16,90 @@ package com.morlunk.jumble.audio; +import android.media.AudioFormat; +import android.media.AudioRecord; +import android.media.MediaRecorder; + +import com.morlunk.jumble.audio.celt11.CELT11; +import com.morlunk.jumble.audio.celt7.CELT7; +import com.morlunk.jumble.audio.celt7.SWIGTYPE_p_CELTMode; +import com.morlunk.jumble.audio.opus.Opus; +import com.morlunk.jumble.audio.opus.OpusConstants; import com.morlunk.jumble.audio.opus.SWIGTYPE_p_OpusEncoder; import com.morlunk.jumble.net.JumbleUDPMessageType; /** * Created by andrew on 23/08/13. */ -public class AudioInput { +public class AudioInput implements Runnable { + private interface JumbleVoiceListener { + public void onFrameEncoded(byte[] data, int frameSize); + } + private SWIGTYPE_p_OpusEncoder mOpusEncoder; - private com.morlunk.jumble.audio.celt11.SWIGTYPE_p_CELTEncoder mCelt11Encoder; - private com.morlunk.jumble.audio.celt7.SWIGTYPE_p_CELTEncoder mCelt7Encoder; + private com.morlunk.jumble.audio.celt11.SWIGTYPE_p_CELTEncoder mCELTBetaEncoder; + private com.morlunk.jumble.audio.celt7.SWIGTYPE_p_CELTMode mCELTAlphaMode; + private com.morlunk.jumble.audio.celt7.SWIGTYPE_p_CELTEncoder mCELTAlphaEncoder; + + private JumbleVoiceListener mListener; + + private AudioRecord mAudioRecord; + private int mMinBufferSize; + private int mInputSampleRate = 44100; + private int mFrameSize = Audio.FRAME_SIZE; private JumbleUDPMessageType mCodec; - public AudioInput(JumbleUDPMessageType codec) { + public AudioInput(JumbleUDPMessageType codec, JumbleVoiceListener listener) { mCodec = codec; + mListener = listener; + int[] error = new int[1]; switch (codec) { case UDPVoiceOpus: + mOpusEncoder = Opus.opus_encoder_create(Audio.SAMPLE_RATE, 1, OpusConstants.OPUS_APPLICATION_VOIP, error); break; case UDPVoiceCELTBeta: + mCELTBetaEncoder = CELT11.celt_encoder_create(Audio.SAMPLE_RATE, 1, error); break; case UDPVoiceCELTAlpha: + mCELTAlphaMode = CELT7.celt_mode_create(Audio.SAMPLE_RATE, Audio.FRAME_SIZE, error); + mCELTAlphaEncoder = CELT7.celt_encoder_create(mCELTAlphaMode, 1, error); break; case UDPVoiceSpeex: + // TODO break; } + + mMinBufferSize = AudioRecord.getMinBufferSize(mInputSampleRate, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT); + mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, mInputSampleRate, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, mMinBufferSize); } public void startRecording() { - + mAudioRecord.startRecording(); } public void stopRecording() { - + mAudioRecord.stop(); + } + + @Override + public void run() { + while(mAudioRecord.getState() == AudioRecord.RECORDSTATE_RECORDING) { + short[] audioData = new short[mFrameSize]; + byte[] encodedData = new byte[512]; + if(mAudioRecord.read(audioData, 0, mFrameSize) == AudioRecord.SUCCESS) { + switch (mCodec) { + case UDPVoiceOpus: + Opus.opus_encode(mOpusEncoder, audioData, mFrameSize, encodedData, 512); + break; + case UDPVoiceCELTBeta: + break; + case UDPVoiceCELTAlpha: + break; + case UDPVoiceSpeex: + break; + } + } + } } } diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java index 5f57463..9a1bb6c 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java index 0d6d4c3..65a5964 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java index 025598d..27f89e7 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTDecoder.java b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTDecoder.java index a9fd4da..713d400 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTDecoder.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTDecoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTEncoder.java b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTEncoder.java index c85912c..5d2bc68 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTEncoder.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTEncoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTMode.java b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTMode.java index 94f39a5..f720667 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTMode.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/SWIGTYPE_p_CELTMode.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java index fb5d8e4..59551d9 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java index bb854e5..62bd940 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java index 7b61ba4..349e109 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTDecoder.java b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTDecoder.java index 03a80ee..dee7f32 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTDecoder.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTDecoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTEncoder.java b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTEncoder.java index 3004d1e..7b012d1 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTEncoder.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTEncoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTMode.java b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTMode.java index d9e39a5..fad5fc5 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTMode.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/SWIGTYPE_p_CELTMode.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/Opus.java b/src/main/java/com/morlunk/jumble/audio/opus/Opus.java index 05f0274..d20b40d 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/Opus.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/Opus.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java b/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java index 656fa44..f320dbf 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java b/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java index 6fc01d2..0137325 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusDecoder.java b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusDecoder.java index 571c0c3..440c046 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusDecoder.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusDecoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusEncoder.java b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusEncoder.java index 12c5560..6f1370f 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusEncoder.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusEncoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusRepacketizer.java b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusRepacketizer.java index 335391b..d181ace 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusRepacketizer.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_OpusRepacketizer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_p_unsigned_char.java b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_p_unsigned_char.java index ef18783..083a3ac 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_p_unsigned_char.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_p_unsigned_char.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_short.java b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_short.java index 6b6d2d7..edc683b 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_short.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/SWIGTYPE_p_short.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java b/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java index 3c2e252..1555d8e 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_JitterBuffer_.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_JitterBuffer_.java index a83ab65..64461be 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_JitterBuffer_.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_JitterBuffer_.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexDecorrState_.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexDecorrState_.java index e45618d..c9a3bb8 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexDecorrState_.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexDecorrState_.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexEchoState_.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexEchoState_.java index 653c116..b1f1cdc 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexEchoState_.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexEchoState_.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexResamplerState_.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexResamplerState_.java index 8670a78..35633e8 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexResamplerState_.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_SpeexResamplerState_.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__struct_SpeexMode__p_void.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__struct_SpeexMode__p_void.java index 0eec2d2..fbb82c4 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__struct_SpeexMode__p_void.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__struct_SpeexMode__p_void.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__void_int_p_void__int.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__void_int_p_void__int.java index 72059be..81d4f65 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__void_int_p_void__int.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_q_const__void_int_p_void__int.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void__void.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void__void.java index 1d34000..19dd1bd 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void__void.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void__void.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_int_p_void__int.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_int_p_void__int.java index 939a8d6..6489d7f 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_int_p_void__int.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_int_p_void__int.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_struct_SpeexBits_p_void__int.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_struct_SpeexBits_p_void__int.java index 8814592..36c3294 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_struct_SpeexBits_p_void__int.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_struct_SpeexBits_p_void__int.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_void_p_struct_SpeexBits__int.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_void_p_struct_SpeexBits__int.java index a3df351..ca74682 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_void_p_struct_SpeexBits__int.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_f_p_void_p_void_p_struct_SpeexBits__int.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_p_SpeexMode.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_p_SpeexMode.java index ff017ee..df30f1e 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_p_SpeexMode.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_p_SpeexMode.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_void.java b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_void.java index 42dc7e2..eb8eebb 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_void.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SWIGTYPE_p_void.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/Speex.java b/src/main/java/com/morlunk/jumble/audio/speex/Speex.java index 618d6d4..a226288 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/Speex.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/Speex.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java index b6b6c0e..a15461f 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java index 58ce143..dab4a6d 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java index 3925a71..65efba3 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java index 60d1afa..e15bf1b 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 + * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/main/java/com/morlunk/jumble/net/JumbleConnection.java b/src/main/java/com/morlunk/jumble/net/JumbleConnection.java index baf53a1..2bd7b6a 100644 --- a/src/main/java/com/morlunk/jumble/net/JumbleConnection.java +++ b/src/main/java/com/morlunk/jumble/net/JumbleConnection.java @@ -57,7 +57,8 @@ public class JumbleConnection { * For annoying types like UDPTunnel. */ public static final List<JumbleTCPMessageType> UNLOGGED_MESSAGES = Arrays.asList(new JumbleTCPMessageType[] { - JumbleTCPMessageType.UDPTunnel + JumbleTCPMessageType.UDPTunnel, + JumbleTCPMessageType.Ping }); // Tor connection details @@ -497,8 +498,7 @@ public class JumbleConnection { * @param data Raw protobuf TCP data. * @param messageType Type of the message. * @return The parsed protobuf message. - * @throws InvalidProtocolBufferException Called if the messageType doe - }s not match the data. + * @throws InvalidProtocolBufferException Called if the messageType does not match the data. */ public static final Message getProtobufMessage(byte[] data, JumbleTCPMessageType messageType) throws InvalidProtocolBufferException { switch (messageType) { @@ -782,7 +782,8 @@ public class JumbleConnection { * @throws IOException if we can't write the message to the server. */ public void sendMessage(Message message, JumbleTCPMessageType messageType) throws IOException { - Log.v(Constants.TAG, "OUT: "+messageType); + if(!UNLOGGED_MESSAGES.contains(messageType)) + Log.v(Constants.TAG, "OUT: "+messageType); mDataOutput.writeShort(messageType.ordinal()); mDataOutput.writeInt(message.getSerializedSize()); message.writeTo(mDataOutput); @@ -794,7 +795,8 @@ public class JumbleConnection { * @throws IOException if we can't write the message to the server. */ public void sendMessage(byte[] message, JumbleTCPMessageType messageType) throws IOException { - Log.v(Constants.TAG, "OUT: "+messageType); + if(!UNLOGGED_MESSAGES.contains(messageType)) + Log.v(Constants.TAG, "OUT: "+messageType); mDataOutput.writeShort(messageType.ordinal()); mDataOutput.writeInt(message.length); mDataOutput.write(message); @@ -856,7 +858,7 @@ public class JumbleConnection { if(!force && (mForceTCP || !mUsingUDP)) { ByteBuffer bb = ByteBuffer.allocate(length + 6); - bb.putShort((short) JumbleUDPMessageType.UDPPing.ordinal()); + bb.putShort((short) messageType.ordinal()); bb.putInt(length); bb.put(data); mTCP.sendData(bb.array()); diff --git a/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java b/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java index 28344de..82fbd05 100644 --- a/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java +++ b/src/main/java/com/morlunk/jumble/net/JumbleSSLSocketFactory.java @@ -18,6 +18,7 @@ package com.morlunk.jumble.net; import java.io.IOException; import java.net.InetSocketAddress; +import java.net.Proxy; import java.net.Socket; import java.security.KeyManagementException; import java.security.KeyStore; @@ -26,41 +27,62 @@ import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; - -import ch.boye.httpclientandroidlib.conn.ssl.SSLSocketFactory; -import ch.boye.httpclientandroidlib.params.BasicHttpParams; -import ch.boye.httpclientandroidlib.params.HttpParams; -import socks.Socks5Proxy; -import socks.SocksSocket; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; public class JumbleSSLSocketFactory { - private SSLSocketFactory mSocketFactory; + private SSLContext mContext; public JumbleSSLSocketFactory(KeyStore keystore, String keystorePassword) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException, NoSuchProviderException { - mSocketFactory = new SSLSocketFactory(SSLSocketFactory.TLS, - keystore, - keystorePassword, - null, - new SecureRandom(), - SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); // No need for trust store at the moment. FIXME security + mContext = SSLContext.getInstance("TLS"); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("X509"); + kmf.init(keystore, keystorePassword != null ? keystorePassword.toCharArray() : new char[0]); + + mContext.init(kmf.getKeyManagers(), new TrustManager[] { new JumblePermissiveTrustManager() }, new SecureRandom()); } /** * Creates a new SSLSocket that runs through a SOCKS5 proxy to reach its destination. */ public SSLSocket createTorSocket(String host, int port, String proxyHost, int proxyPort) throws IOException { - Socks5Proxy proxy = new Socks5Proxy(proxyHost, proxyPort); - proxy.resolveAddrLocally(false); // Let SOCKS5 proxy resolve host. Useful for Tor. - SocksSocket socksSocket = new SocksSocket(proxy, host, port); - return (SSLSocket) mSocketFactory.createLayeredSocket(socksSocket, proxyHost, proxyPort, new BasicHttpParams()); + Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(proxyHost, proxyPort)); + Socket socket = new Socket(proxy); + socket.connect(new InetSocketAddress(host, port)); + return (SSLSocket) mContext.getSocketFactory().createSocket(socket, host, port, true); } public SSLSocket createSocket(String host, int port) throws IOException { - HttpParams params = new BasicHttpParams(); - Socket socket = mSocketFactory.createSocket(params); - return (SSLSocket) mSocketFactory.connectSocket(socket, new InetSocketAddress(host, port), null, params); + return (SSLSocket) mContext.getSocketFactory().createSocket(host, port); + } + + /** + * This is horrible practice- we should prompt the user when the server's certificate is not trusted. + * TODO FIX: SECURITY + */ + private static class JumblePermissiveTrustManager implements X509TrustManager { + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } } }
\ No newline at end of file diff --git a/src/main/java/com/morlunk/jumble/net/UserHandler.java b/src/main/java/com/morlunk/jumble/net/UserHandler.java index ee2e404..a33de1a 100644 --- a/src/main/java/com/morlunk/jumble/net/UserHandler.java +++ b/src/main/java/com/morlunk/jumble/net/UserHandler.java @@ -47,7 +47,7 @@ public class UserHandler extends JumbleMessageHandler.Stub { public int compare(Integer lhs, Integer rhs) { User ulhs = mUsers.get(lhs); User urhs = mUsers.get(rhs); - return ulhs.getName().compareTo(urhs.getName()); + return ulhs.getName().toLowerCase().compareTo(urhs.getName().toLowerCase()); } }; @@ -101,6 +101,10 @@ public class UserHandler extends JumbleMessageHandler.Stub { return; } + User actor = null; + if(msg.hasActor()) + actor = getUser(msg.getActor()); + final User finalUser = user; if(msg.hasUserId()) @@ -164,6 +168,15 @@ public class UserHandler extends JumbleMessageHandler.Stub { user.setDeafened(msg.getDeaf()); if(msg.hasPrioritySpeaker()) user.setPrioritySpeaker(msg.getPrioritySpeaker()); + +/* if(self != null && ((user.getChannelId() == self.getChannelId()) || (actor.getSession() == self.getSession()))) { + if(user.getSession() == self.getSession()) { + if(msg.hasMute() && msg.hasDeaf() && user.isMuted() && user.isDeafened()) { + mService.logInfo(); + } + } + }*/ + /* * TODO: logging * Base this off of Messages.cpp:353 @@ -230,25 +243,26 @@ public class UserHandler extends JumbleMessageHandler.Stub { @Override public void messageUserRemove(Mumble.UserRemove msg) { + final User user = getUser(msg.getSession()); + final User actor = getUser(msg.getActor()); final String reason = msg.getReason(); - /* - * TODO: logging - * Base this off of Messages.cpp:511 - */ + if(msg.getSession() == mService.getSession()) + mService.logWarning(mService.getString(msg.getBan() ? R.string.chat_notify_kick_ban_self : R.string.chat_notify_kick_self, MessageFormatter.highlightString(actor.getName()), reason)); + else if(actor != null) + mService.logInfo(mService.getString(msg.getBan() ? R.string.chat_notify_kick_ban : R.string.chat_notify_kick, MessageFormatter.highlightString(actor.getName()), reason, MessageFormatter.highlightString(user.getName()))); + else + mService.logInfo(mService.getString(R.string.chat_notify_disconnected, MessageFormatter.highlightString(user.getName()))); - if(msg.getSession() != mService.getSession()) { - final User user = mService.getUserHandler().getUser(msg.getSession()); - Channel channel = mService.getChannelHandler().getChannel(user.getChannelId()); - channel.removeUser(user.getSession()); + Channel channel = mService.getChannelHandler().getChannel(user.getChannelId()); + channel.removeUser(user.getSession()); - mService.getChannelHandler().changeSubchannelUsers(channel, -1); - mService.notifyObservers(new JumbleService.ObserverRunnable() { - @Override - public void run(IJumbleObserver observer) throws RemoteException { - observer.onUserRemoved(user, reason); - } - }); - } + mService.getChannelHandler().changeSubchannelUsers(channel, -1); + mService.notifyObservers(new JumbleService.ObserverRunnable() { + @Override + public void run(IJumbleObserver observer) throws RemoteException { + observer.onUserRemoved(user, reason); + } + }); } } diff --git a/src/main/jni/audio_types.i b/src/main/jni/audio_types.i index a724e29..26f7d60 100644 --- a/src/main/jni/audio_types.i +++ b/src/main/jni/audio_types.i @@ -14,7 +14,7 @@ /* Wrap pointers to java arrays */ %include "typemaps.i" -%apply int *INOUT { int * } -%apply int *INOUT { unsigned int * } +%apply int *OUTPUT { int * } +%apply int *OUTPUT { unsigned int * } %apply short *INOUT { short * } %apply float *INOUT { float * }
\ No newline at end of file diff --git a/src/main/jni/celt-0.11.0-build/celt_wrap.c b/src/main/jni/celt-0.11.0-build/celt_wrap.c index 17ed65a..1c0670e 100644 --- a/src/main/jni/celt-0.11.0-build/celt_wrap.c +++ b/src/main/jni/celt-0.11.0-build/celt_wrap.c @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.11 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGJAVA @@ -41,28 +41,28 @@ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -105,7 +105,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -476,6 +476,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1mo celt_int32 arg1 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTMode *result = 0 ; (void)jenv; @@ -491,12 +492,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1mo SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTMode *)celt_mode_create(arg1,arg2,arg3); *(CELTMode **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -518,6 +521,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1mod CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; celt_int32 *arg3 = (celt_int32 *) 0 ; + celt_int32 temp3 ; int result; (void)jenv; @@ -533,12 +537,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1mod SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (celt_int32 *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (celt_int32)0; + arg3 = &temp3; } result = (int)celt_mode_info((struct CELTMode const *)arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -580,6 +586,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en int arg1 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTEncoder *result = 0 ; (void)jenv; @@ -595,12 +602,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTEncoder *)celt_encoder_create(arg1,arg2,arg3); *(CELTEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -612,6 +621,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTEncoder *result = 0 ; (void)jenv; @@ -627,12 +637,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTEncoder *)celt_encoder_create_custom((struct CELTMode const *)arg1,arg2,arg3); *(CELTEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -645,6 +657,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en int arg2 ; int arg3 ; int *arg4 = (int *) 0 ; + int temp4 ; CELTEncoder *result = 0 ; (void)jenv; @@ -661,12 +674,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (int)0; + arg4 = &temp4; } result = (CELTEncoder *)celt_encoder_init(arg1,arg2,arg3,arg4); *(CELTEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; @@ -679,6 +694,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en CELTMode *arg2 = (CELTMode *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; + int temp4 ; CELTEncoder *result = 0 ; (void)jenv; @@ -695,12 +711,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1en SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (int)0; + arg4 = &temp4; } result = (CELTEncoder *)celt_encoder_init_custom(arg1,(struct CELTMode const *)arg2,arg3,arg4); *(CELTEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; @@ -806,6 +824,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1enc CELTEncoder *arg1 = (CELTEncoder *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; int result; (void)jenv; @@ -821,12 +840,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1enc SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (int)celt_encoder_ctl(arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -868,6 +889,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de int arg1 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTDecoder *result = 0 ; (void)jenv; @@ -883,12 +905,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTDecoder *)celt_decoder_create(arg1,arg2,arg3); *(CELTDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -900,6 +924,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTDecoder *result = 0 ; (void)jenv; @@ -915,12 +940,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTDecoder *)celt_decoder_create_custom((struct CELTMode const *)arg1,arg2,arg3); *(CELTDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -933,6 +960,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de int arg2 ; int arg3 ; int *arg4 = (int *) 0 ; + int temp4 ; CELTDecoder *result = 0 ; (void)jenv; @@ -949,12 +977,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (int)0; + arg4 = &temp4; } result = (CELTDecoder *)celt_decoder_init(arg1,arg2,arg3,arg4); *(CELTDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; @@ -967,6 +997,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de CELTMode *arg2 = (CELTMode *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; + int temp4 ; CELTDecoder *result = 0 ; (void)jenv; @@ -983,12 +1014,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt11_CELT11JNI_celt_1de SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (int)0; + arg4 = &temp4; } result = (CELTDecoder *)celt_decoder_init_custom(arg1,(struct CELTMode const *)arg2,arg3,arg4); *(CELTDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; diff --git a/src/main/jni/celt-0.7.0-build/celt_wrap.c b/src/main/jni/celt-0.7.0-build/celt_wrap.c index 5ac42ae..20ad78d 100644 --- a/src/main/jni/celt-0.7.0-build/celt_wrap.c +++ b/src/main/jni/celt-0.7.0-build/celt_wrap.c @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.11 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGJAVA @@ -41,28 +41,28 @@ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -105,7 +105,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -416,6 +416,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1mode celt_int32 arg1 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTMode *result = 0 ; (void)jenv; @@ -431,12 +432,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1mode SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTMode *)celt_mode_create(arg1,arg2,arg3); *(CELTMode **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -458,6 +461,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1mode_ CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; celt_int32 *arg3 = (celt_int32 *) 0 ; + celt_int32 temp3 ; int result; (void)jenv; @@ -473,12 +477,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1mode_ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (celt_int32 *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (celt_int32)0; + arg3 = &temp3; } result = (int)celt_mode_info((struct CELTMode const *)arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -490,6 +496,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1enco CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTEncoder *result = 0 ; (void)jenv; @@ -505,12 +512,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1enco SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTEncoder *)celt_encoder_create((struct CELTMode const *)arg1,arg2,arg3); *(CELTEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -644,6 +653,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1encod CELTEncoder *arg1 = (CELTEncoder *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; int result; (void)jenv; @@ -659,12 +669,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1encod SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (int)celt_encoder_ctl(arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -676,6 +688,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1deco CELTMode *arg1 = (CELTMode *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; CELTDecoder *result = 0 ; (void)jenv; @@ -691,12 +704,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_celt7_CELT7JNI_celt_1deco SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (CELTDecoder *)celt_decoder_create((struct CELTMode const *)arg1,arg2,arg3); *(CELTDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; diff --git a/src/main/jni/opus-build/opus_wrap.c b/src/main/jni/opus-build/opus_wrap.c index c0483bf..ad06cda 100644 --- a/src/main/jni/opus-build/opus_wrap.c +++ b/src/main/jni/opus-build/opus_wrap.c @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.11 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGJAVA @@ -41,28 +41,28 @@ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -105,7 +105,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -1010,6 +1010,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1encode int arg2 ; int arg3 ; int *arg4 = (int *) 0 ; + int temp4 ; OpusEncoder *result = 0 ; (void)jenv; @@ -1026,12 +1027,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1encode SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (int)0; + arg4 = &temp4; } result = (OpusEncoder *)opus_encoder_create(arg1,arg2,arg3,arg4); *(OpusEncoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; @@ -1157,6 +1160,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1encoder OpusEncoder *arg1 = (OpusEncoder *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; int result; (void)jenv; @@ -1172,12 +1176,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1encoder SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (int)opus_encoder_ctl(arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -1203,6 +1209,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1decode opus_int32 arg1 ; int arg2 ; int *arg3 = (int *) 0 ; + int temp3 ; OpusDecoder *result = 0 ; (void)jenv; @@ -1218,12 +1225,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1decode SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (int)0; + arg3 = &temp3; } result = (OpusDecoder *)opus_decoder_create(arg1,arg2,arg3); *(OpusDecoder **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -1371,6 +1380,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1packet_ unsigned char **arg4 ; opus_int16 *arg5 ; int *arg6 = (int *) 0 ; + int temp6 ; int result; (void)jenv; @@ -1393,7 +1403,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1packet_ SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg6 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg6, 0); + temp6 = (int)0; + arg6 = &temp6; } result = (int)opus_packet_parse((unsigned char const *)arg1,arg2,arg3,(unsigned char const *(*))arg4,arg5,arg6); jresult = (jint)result; @@ -1404,7 +1415,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_opus_OpusJNI_opus_1packet_ (*jenv)->ReleaseByteArrayElements(jenv, jarg3, (jbyte *) arg3, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg6, (jint *)arg6, 0); + jint jvalue = (jint)temp6; + (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue); } diff --git a/src/main/jni/speex-build/speex_wrap.c b/src/main/jni/speex-build/speex_wrap.c index 316f12a..9a88af9 100644 --- a/src/main/jni/speex-build/speex_wrap.c +++ b/src/main/jni/speex-build/speex_wrap.c @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.10 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.11 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGJAVA @@ -41,28 +41,28 @@ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -105,7 +105,7 @@ # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -1617,8 +1617,13 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_SpeexBits_1 arg2 = (char *) (*jenv)->GetByteArrayElements(jenv, jarg2, 0); } { - if (arg2) strcpy((char *)arg1->chars, (const char *)arg2); - else arg1->chars[0] = 0; + free(arg1->chars); + if (arg2) { + arg1->chars = (char *) malloc(strlen((const char *)arg2)+1); + strcpy((char *)arg1->chars, (const char *)arg2); + } else { + arg1->chars = 0; + } } { (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte *) arg2, 0); @@ -2201,8 +2206,13 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_JitterBuffe arg2 = (char *) (*jenv)->GetByteArrayElements(jenv, jarg2, 0); } { - if (arg2) strcpy((char *)arg1->data, (const char *)arg2); - else arg1->data[0] = 0; + free(arg1->data); + if (arg2) { + arg1->data = (char *) malloc(strlen((const char *)arg2)+1); + strcpy((char *)arg1->data, (const char *)arg2); + } else { + arg1->data = 0; + } } { (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte *) arg2, 0); @@ -2669,6 +2679,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_jitter_1buf JitterBufferPacket *arg2 = (JitterBufferPacket *) 0 ; spx_int32_t arg3 ; spx_int32_t *arg4 = (spx_int32_t *) 0 ; + spx_int32_t temp4 ; int result; (void)jenv; @@ -2686,12 +2697,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_jitter_1buf SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (spx_int32_t *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (spx_int32_t)0; + arg4 = &temp4; } result = (int)jitter_buffer_get(arg1,arg2,arg3,arg4); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } return jresult; @@ -2788,6 +2801,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_jitter_1buf JitterBuffer *arg1 = (JitterBuffer *) 0 ; JitterBufferPacket *arg2 = (JitterBufferPacket *) 0 ; spx_int32_t *arg3 = (spx_int32_t *) 0 ; + spx_int32_t temp3 ; int result; (void)jenv; @@ -2804,12 +2818,14 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_jitter_1buf SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (spx_int32_t *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (spx_int32_t)0; + arg3 = &temp3; } result = (int)jitter_buffer_update_delay(arg1,arg2,arg3); jresult = (jint)result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } return jresult; @@ -2986,6 +3002,7 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1echo spx_int16_t *arg3 = (spx_int16_t *) 0 ; spx_int16_t *arg4 = (spx_int16_t *) 0 ; spx_int32_t *arg5 = (spx_int32_t *) 0 ; + spx_int32_t temp5 ; (void)jenv; (void)jcls; @@ -3032,7 +3049,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1echo SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg5 = (spx_int32_t *) (*jenv)->GetIntArrayElements(jenv, jarg5, 0); + temp5 = (spx_int32_t)0; + arg5 = &temp5; } speex_echo_cancel(arg1,(short const *)arg2,(short const *)arg3,arg4,arg5); { @@ -3045,7 +3063,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1echo (*jenv)->ReleaseShortArrayElements(jenv, jarg4, (jshort *)arg4, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg5, (jint *)arg5, 0); + jint jvalue = (jint)temp5; + (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue); } @@ -3375,6 +3394,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1res spx_uint32_t arg3 ; int arg4 ; int *arg5 = (int *) 0 ; + int temp5 ; SpeexResamplerState *result = 0 ; (void)jenv; @@ -3392,12 +3412,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1res SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg5 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg5, 0); + temp5 = (int)0; + arg5 = &temp5; } result = (SpeexResamplerState *)speex_resampler_init(arg1,arg2,arg3,arg4,arg5); *(SpeexResamplerState **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg5, (jint *)arg5, 0); + jint jvalue = (jint)temp5; + (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue); } return jresult; @@ -3413,6 +3435,7 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1res spx_uint32_t arg5 ; int arg6 ; int *arg7 = (int *) 0 ; + int temp7 ; SpeexResamplerState *result = 0 ; (void)jenv; @@ -3432,12 +3455,14 @@ SWIGEXPORT jlong JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1res SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg7 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg7, 0); + temp7 = (int)0; + arg7 = &temp7; } result = (SpeexResamplerState *)speex_resampler_init_frac(arg1,arg2,arg3,arg4,arg5,arg6,arg7); *(SpeexResamplerState **)&jresult = result; { - (*jenv)->ReleaseIntArrayElements(jenv, jarg7, (jint *)arg7, 0); + jint jvalue = (jint)temp7; + (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue); } return jresult; @@ -3462,6 +3487,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa spx_uint32_t *arg4 = (spx_uint32_t *) 0 ; float *arg5 = (float *) 0 ; spx_uint32_t *arg6 = (spx_uint32_t *) 0 ; + spx_uint32_t temp4 ; + spx_uint32_t temp6 ; int result; (void)jenv; @@ -3488,7 +3515,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (spx_uint32_t)0; + arg4 = &temp4; } { if (!jarg5) { @@ -3510,7 +3538,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg6 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg6, 0); + temp6 = (spx_uint32_t)0; + arg6 = &temp6; } result = (int)speex_resampler_process_float(arg1,arg2,(float const *)arg3,arg4,arg5,arg6); jresult = (jint)result; @@ -3518,13 +3547,15 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa (*jenv)->ReleaseFloatArrayElements(jenv, jarg3, (jfloat *)arg3, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } { (*jenv)->ReleaseFloatArrayElements(jenv, jarg5, (jfloat *)arg5, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg6, (jint *)arg6, 0); + jint jvalue = (jint)temp6; + (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue); } @@ -3542,6 +3573,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa spx_uint32_t *arg4 = (spx_uint32_t *) 0 ; spx_int16_t *arg5 = (spx_int16_t *) 0 ; spx_uint32_t *arg6 = (spx_uint32_t *) 0 ; + spx_uint32_t temp4 ; + spx_uint32_t temp6 ; int result; (void)jenv; @@ -3568,7 +3601,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg4 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg4, 0); + temp4 = (spx_uint32_t)0; + arg4 = &temp4; } { if (!jarg5) { @@ -3590,7 +3624,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg6 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg6, 0); + temp6 = (spx_uint32_t)0; + arg6 = &temp6; } result = (int)speex_resampler_process_int(arg1,arg2,(short const *)arg3,arg4,arg5,arg6); jresult = (jint)result; @@ -3598,13 +3633,15 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa (*jenv)->ReleaseShortArrayElements(jenv, jarg3, (jshort *)arg3, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg4, (jint *)arg4, 0); + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } { (*jenv)->ReleaseShortArrayElements(jenv, jarg5, (jshort *)arg5, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg6, (jint *)arg6, 0); + jint jvalue = (jint)temp6; + (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue); } @@ -3621,6 +3658,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa spx_uint32_t *arg3 = (spx_uint32_t *) 0 ; float *arg4 = (float *) 0 ; spx_uint32_t *arg5 = (spx_uint32_t *) 0 ; + spx_uint32_t temp3 ; + spx_uint32_t temp5 ; int result; (void)jenv; @@ -3646,7 +3685,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (spx_uint32_t)0; + arg3 = &temp3; } { if (!jarg4) { @@ -3668,7 +3708,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg5 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg5, 0); + temp5 = (spx_uint32_t)0; + arg5 = &temp5; } result = (int)speex_resampler_process_interleaved_float(arg1,(float const *)arg2,arg3,arg4,arg5); jresult = (jint)result; @@ -3676,13 +3717,15 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa (*jenv)->ReleaseFloatArrayElements(jenv, jarg2, (jfloat *)arg2, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } { (*jenv)->ReleaseFloatArrayElements(jenv, jarg4, (jfloat *)arg4, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg5, (jint *)arg5, 0); + jint jvalue = (jint)temp5; + (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue); } @@ -3699,6 +3742,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa spx_uint32_t *arg3 = (spx_uint32_t *) 0 ; spx_int16_t *arg4 = (spx_int16_t *) 0 ; spx_uint32_t *arg5 = (spx_uint32_t *) 0 ; + spx_uint32_t temp3 ; + spx_uint32_t temp5 ; int result; (void)jenv; @@ -3724,7 +3769,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg3 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (spx_uint32_t)0; + arg3 = &temp3; } { if (!jarg4) { @@ -3746,7 +3792,8 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return 0; } - arg5 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg5, 0); + temp5 = (spx_uint32_t)0; + arg5 = &temp5; } result = (int)speex_resampler_process_interleaved_int(arg1,(short const *)arg2,arg3,arg4,arg5); jresult = (jint)result; @@ -3754,13 +3801,15 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa (*jenv)->ReleaseShortArrayElements(jenv, jarg2, (jshort *)arg2, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } { (*jenv)->ReleaseShortArrayElements(jenv, jarg4, (jshort *)arg4, 0); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg5, (jint *)arg5, 0); + jint jvalue = (jint)temp5; + (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue); } @@ -3792,6 +3841,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SpeexResamplerState *arg1 = (SpeexResamplerState *) 0 ; spx_uint32_t *arg2 = (spx_uint32_t *) 0 ; spx_uint32_t *arg3 = (spx_uint32_t *) 0 ; + spx_uint32_t temp2 ; + spx_uint32_t temp3 ; (void)jenv; (void)jcls; @@ -3805,7 +3856,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg2 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg2, 0); + temp2 = (spx_uint32_t)0; + arg2 = &temp2; } { if (!jarg3) { @@ -3816,14 +3868,17 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg3 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (spx_uint32_t)0; + arg3 = &temp3; } speex_resampler_get_rate(arg1,arg2,arg3); { - (*jenv)->ReleaseIntArrayElements(jenv, jarg2, (jint *)arg2, 0); + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } @@ -3856,6 +3911,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SpeexResamplerState *arg1 = (SpeexResamplerState *) 0 ; spx_uint32_t *arg2 = (spx_uint32_t *) 0 ; spx_uint32_t *arg3 = (spx_uint32_t *) 0 ; + spx_uint32_t temp2 ; + spx_uint32_t temp3 ; (void)jenv; (void)jcls; @@ -3869,7 +3926,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg2 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg2, 0); + temp2 = (spx_uint32_t)0; + arg2 = &temp2; } { if (!jarg3) { @@ -3880,14 +3938,17 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg3 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg3, 0); + temp3 = (spx_uint32_t)0; + arg3 = &temp3; } speex_resampler_get_ratio(arg1,arg2,arg3); { - (*jenv)->ReleaseIntArrayElements(jenv, jarg2, (jint *)arg2, 0); + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); } { - (*jenv)->ReleaseIntArrayElements(jenv, jarg3, (jint *)arg3, 0); + jint jvalue = (jint)temp3; + (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue); } @@ -3913,6 +3974,7 @@ SWIGEXPORT jint JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resampler_1get_1quality(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) { SpeexResamplerState *arg1 = (SpeexResamplerState *) 0 ; int *arg2 = (int *) 0 ; + int temp2 ; (void)jenv; (void)jcls; @@ -3926,11 +3988,13 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg2 = (int *) (*jenv)->GetIntArrayElements(jenv, jarg2, 0); + temp2 = (int)0; + arg2 = &temp2; } speex_resampler_get_quality(arg1,arg2); { - (*jenv)->ReleaseIntArrayElements(jenv, jarg2, (jint *)arg2, 0); + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); } } @@ -3951,6 +4015,7 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resampler_1get_1input_1stride(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) { SpeexResamplerState *arg1 = (SpeexResamplerState *) 0 ; spx_uint32_t *arg2 = (spx_uint32_t *) 0 ; + spx_uint32_t temp2 ; (void)jenv; (void)jcls; @@ -3964,11 +4029,13 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg2 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg2, 0); + temp2 = (spx_uint32_t)0; + arg2 = &temp2; } speex_resampler_get_input_stride(arg1,arg2); { - (*jenv)->ReleaseIntArrayElements(jenv, jarg2, (jint *)arg2, 0); + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); } } @@ -3989,6 +4056,7 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resampler_1get_1output_1stride(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) { SpeexResamplerState *arg1 = (SpeexResamplerState *) 0 ; spx_uint32_t *arg2 = (spx_uint32_t *) 0 ; + spx_uint32_t temp2 ; (void)jenv; (void)jcls; @@ -4002,11 +4070,13 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_speex_1resa SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - arg2 = (spx_uint32_t *) (*jenv)->GetIntArrayElements(jenv, jarg2, 0); + temp2 = (spx_uint32_t)0; + arg2 = &temp2; } speex_resampler_get_output_stride(arg1,arg2); { - (*jenv)->ReleaseIntArrayElements(jenv, jarg2, (jint *)arg2, 0); + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); } } diff --git a/src/main/libs/armeabi/libcelt11.so b/src/main/libs/armeabi/libcelt11.so Binary files differnew file mode 100755 index 0000000..5cd7275 --- /dev/null +++ b/src/main/libs/armeabi/libcelt11.so diff --git a/src/main/libs/armeabi/libcelt7.so b/src/main/libs/armeabi/libcelt7.so Binary files differnew file mode 100755 index 0000000..9064247 --- /dev/null +++ b/src/main/libs/armeabi/libcelt7.so diff --git a/src/main/libs/armeabi/libopus.so b/src/main/libs/armeabi/libopus.so Binary files differnew file mode 100755 index 0000000..3d03793 --- /dev/null +++ b/src/main/libs/armeabi/libopus.so diff --git a/src/main/libs/armeabi/libspeex.so b/src/main/libs/armeabi/libspeex.so Binary files differnew file mode 100755 index 0000000..c15ddef --- /dev/null +++ b/src/main/libs/armeabi/libspeex.so diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 2b001bf..88694cb 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -26,8 +26,20 @@ <string name="chat_notify_now_muted">%s is now muted.</string> <string name="chat_notify_now_unmuted">%s is now unmuted.</string> <string name="chat_notify_now_unmuted_undeafened">%s is now unmuted and undeafened.</string> + <string name="chat_notify_muted_deafened_self_by_actor">You were muted and deafened by %s.</string> + <string name="chat_notify_unmuted_undeafened_self_by_actor">You were unmuted and undeafened by %s.</string> + <string name="chat_notify_muted_self_by_actor">You were muted by %s.</string> + <string name="chat_notify_unmuted_self_by_actor">You were unmuted by %s.</string> + <string name="chat_notify_undeafened_self_by_actor">You were undeafened by %s.</string> + <string name="chat_notify_suppressed_self">You were suppressed.</string> + <string name="chat_notify_unsuppressed_self">You were unsuppressed.</string> + <string name="chat_notify_unsuppressed_self_by_actor">You were unsuppressed by %s.</string> <string name="chat_notify_connected">%s connected.</string> <string name="chat_notify_disconnected">%s disconnected.</string> + <string name="chat_notify_kick_ban_self">You were kicked and banned from the server by %1$s: %2$s.</string> + <string name="chat_notify_kick_self">You were kicked from the server by %1$s: %2$s.</string> + <string name="chat_notify_kick_ban">%3$s was kicked and banned from the server by %1$s: %2$s.</string> + <string name="chat_notify_kick">%3$s was kicked from the server by %1$s: %2$s.</string> <string name="chat_notify_self_recording_started">Recording started</string> <string name="chat_notify_self_recording_stopped">Recording stopped</string> <string name="chat_notify_user_recording_started">%s started recording.</string> |