diff options
author | Andrew Comminos <andrewcomminos@gmail.com> | 2013-08-31 05:29:20 +0400 |
---|---|---|
committer | Andrew Comminos <andrewcomminos@gmail.com> | 2013-08-31 05:29:20 +0400 |
commit | 076a7fefe5eed9f432292d4e3d0fdd29b95ed6ad (patch) | |
tree | a42c0d2118df828e4c6c128db3653501f8f88ce2 | |
parent | 6e2cfa8484818f6c37d450cf6cdf8321a602bd94 (diff) |
More audio output work. Still fixing SWIG issues.
48 files changed, 16 insertions, 649 deletions
diff --git a/src/main/java/com/morlunk/jumble/audio/AudioOutput.java b/src/main/java/com/morlunk/jumble/audio/AudioOutput.java index 2691afe..eab3d53 100644 --- a/src/main/java/com/morlunk/jumble/audio/AudioOutput.java +++ b/src/main/java/com/morlunk/jumble/audio/AudioOutput.java @@ -149,7 +149,7 @@ public class AudioOutput extends JumbleMessageHandler.Stub implements Runnable, JumbleUDPMessageType dataType = JumbleUDPMessageType.values()[data[0] >> 5 & 0x7]; int msgFlags = data[0] & 0x1f; - byte[] voiceData = new byte[data.length-5]; + byte[] voiceData = new byte[data.length-1]; System.arraycopy(data, 1, voiceData, 0, voiceData.length); PacketDataStream pds = new PacketDataStream(voiceData, voiceData.length); @@ -158,8 +158,8 @@ public class AudioOutput extends JumbleMessageHandler.Stub implements Runnable, if(user != null && !user.isLocalMuted()) { // TODO check for whispers here int seq = pds.next(); - ByteBuffer packet = ByteBuffer.allocate(pds.left() + 4); - packet.putInt(msgFlags); + ByteBuffer packet = ByteBuffer.allocate(pds.left() + 1); + packet.put((byte)msgFlags); packet.put(pds.dataBlock(pds.left())); AudioOutputSpeech aop = mAudioOutputs.get(session); diff --git a/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java b/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java index 8b866a8..e072199 100644 --- a/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java +++ b/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java @@ -118,7 +118,7 @@ public class AudioOutputSpeech { byte[] packet = pds.dataBlock(size); int frames = Opus.opus_packet_get_nb_frames(packet, size); - samples = Opus.opus_packet_get_samples_per_frame(packet, Audio.FRAME_SIZE); + samples = frames * Opus.opus_packet_get_samples_per_frame(packet, Audio.FRAME_SIZE); if(samples % Audio.FRAME_SIZE == 0) return; // We can't handle frames which are not a multiple of 10ms. 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 4ff1891..5f57463 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 de219d6..0d6d4c3 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11Constants.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 43d47f1..025598d 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java +++ b/src/main/java/com/morlunk/jumble/audio/celt11/CELT11JNI.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 8595f3e..a9fd4da 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 4e90391..c85912c 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 d772d72..94f39a5 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 4a6dd08..fb5d8e4 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 84203d7..bb854e5 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7Constants.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 f17e6a0..7b61ba4 100644 --- a/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java +++ b/src/main/java/com/morlunk/jumble/audio/celt7/CELT7JNI.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 b808519..03a80ee 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 981e4a6..3004d1e 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 5efe322..d9e39a5 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 a9f9f5a..05f0274 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/Opus.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/Opus.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 0d955a7..656fa44 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/OpusConstants.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 fd3392e..6fc01d2 100644 --- a/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java +++ b/src/main/java/com/morlunk/jumble/audio/opus/OpusJNI.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 ad9f09f..571c0c3 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 889e403..12c5560 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 7bcff3f..335391b 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 9940958..ef18783 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 7d5229e..6b6d2d7 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 3c51149..3c2e252 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/JitterBufferPacket.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 d6f624a..a83ab65 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 2e869d6..e45618d 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 959f426..653c116 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 a521d13..8670a78 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 d1da407..0eec2d2 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 5adfb36..72059be 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 dff17a9..1d34000 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 57e4a99..939a8d6 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 a47edf1..8814592 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 73853cc..a3df351 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 6900f25..ff017ee 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 3369c8f..42dc7e2 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,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 767155a..618d6d4 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/Speex.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/Speex.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 a45c37f..b6b6c0e 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexBits.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 1540a7d..58ce143 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 855e68b..3925a71 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 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 3f1c9fb..60d1afa 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexMode.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2013 Andrew Comminos - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 diff --git a/src/main/java/com/morlunk/jumble/net/JumbleConnection.java b/src/main/java/com/morlunk/jumble/net/JumbleConnection.java index 37ea33e..baf53a1 100644 --- a/src/main/java/com/morlunk/jumble/net/JumbleConnection.java +++ b/src/main/java/com/morlunk/jumble/net/JumbleConnection.java @@ -135,30 +135,13 @@ public class JumbleConnection { @Override public void messageReject(final Mumble.Reject msg) { - if(mListener != null) { - mMainHandler.post(new Runnable() { - @Override - public void run() { - mListener.onConnectionError(new JumbleConnectionException(msg)); - } - }); - } - disconnect(); + handleFatalException(new JumbleConnectionException(msg)); } @Override public void messageUserRemove(final Mumble.UserRemove msg) { - if(msg.getSession() == mSession) { - if(mListener != null) { - mMainHandler.post(new Runnable() { - @Override - public void run() { - mListener.onConnectionError(new JumbleConnectionException(msg)); - } - }); - } - disconnect(); - } + if(msg.getSession() == mSession) + handleFatalException(new JumbleConnectionException(msg)); } @Override diff --git a/src/main/java/com/morlunk/jumble/net/PacketDataStream.java b/src/main/java/com/morlunk/jumble/net/PacketDataStream.java index ebfc30d..4c74e6e 100644 --- a/src/main/java/com/morlunk/jumble/net/PacketDataStream.java +++ b/src/main/java/com/morlunk/jumble/net/PacketDataStream.java @@ -30,6 +30,7 @@ public class PacketDataStream { private boolean mOk; public PacketDataStream(byte[] data, int len) { + mOk = true; mData = data; mMaxSize = len; } @@ -96,6 +97,7 @@ public class PacketDataStream { public byte[] dataBlock(int size) { byte[] block = new byte[size]; System.arraycopy(mData, mOffset, block, 0, size); + mOffset += size; return block; } diff --git a/src/main/jni/audio_types.i b/src/main/jni/audio_types.i index 95640e0..a724e29 100644 --- a/src/main/jni/audio_types.i +++ b/src/main/jni/audio_types.i @@ -6,11 +6,11 @@ #define __EMX__ 1 /* use Java byte[] instead of String for char* */ -%import various.i +%include "various.i" %apply char *BYTE { char * } -%apply char *BYTE { char [] } +%apply char *BYTE { char[] } %apply char *BYTE { unsigned char * } -%apply char *BYTE { unsigned char [] } +%apply char *BYTE { unsigned char[] } /* Wrap pointers to java arrays */ %include "typemaps.i" diff --git a/src/main/jni/speex-build/speex_wrap.c b/src/main/jni/speex-build/speex_wrap.c index b96e9f8..316f12a 100644 --- a/src/main/jni/speex-build/speex_wrap.c +++ b/src/main/jni/speex-build/speex_wrap.c @@ -1617,13 +1617,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_SpeexBits_1 arg2 = (char *) (*jenv)->GetByteArrayElements(jenv, jarg2, 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; - } + if (arg2) strcpy((char *)arg1->chars, (const char *)arg2); + else arg1->chars[0] = 0; } { (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte *) arg2, 0); @@ -2206,13 +2201,8 @@ SWIGEXPORT void JNICALL Java_com_morlunk_jumble_audio_speex_SpeexJNI_JitterBuffe arg2 = (char *) (*jenv)->GetByteArrayElements(jenv, jarg2, 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; - } + if (arg2) strcpy((char *)arg1->data, (const char *)arg2); + else arg1->data[0] = 0; } { (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte *) arg2, 0); diff --git a/src/main/libs/armeabi/libcelt11.so b/src/main/libs/armeabi/libcelt11.so Binary files differdeleted file mode 100755 index 5cd7275..0000000 --- a/src/main/libs/armeabi/libcelt11.so +++ /dev/null diff --git a/src/main/libs/armeabi/libcelt7.so b/src/main/libs/armeabi/libcelt7.so Binary files differdeleted file mode 100755 index edb7cf3..0000000 --- a/src/main/libs/armeabi/libcelt7.so +++ /dev/null diff --git a/src/main/libs/armeabi/libopus.so b/src/main/libs/armeabi/libopus.so Binary files differdeleted file mode 100755 index 3d03793..0000000 --- a/src/main/libs/armeabi/libopus.so +++ /dev/null diff --git a/src/main/libs/armeabi/libspeex.so b/src/main/libs/armeabi/libspeex.so Binary files differdeleted file mode 100755 index 4cb30fc..0000000 --- a/src/main/libs/armeabi/libspeex.so +++ /dev/null |