Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Opus.java « opus « audio « jumble « morlunk « com « java « main « src - github.com/Morlunk/Jumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a9f9f5a32880e76c20181231c699427adc3e56cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
 * 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
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.morlunk.jumble.audio.opus;

public class Opus implements OpusConstants {
  public static byte[] opus_strerror(int error) {
    return OpusJNI.opus_strerror(error);
  }

  public static byte[] opus_get_version_string() {
    return OpusJNI.opus_get_version_string();
  }

  public static int opus_encoder_get_size(int channels) {
    return OpusJNI.opus_encoder_get_size(channels);
  }

  public static SWIGTYPE_p_OpusEncoder opus_encoder_create(int Fs, int channels, int application, int[] error) {
    long cPtr = OpusJNI.opus_encoder_create(Fs, channels, application, error);
    return (cPtr == 0) ? null : new SWIGTYPE_p_OpusEncoder(cPtr, false);
  }

  public static int opus_encoder_init(SWIGTYPE_p_OpusEncoder st, int Fs, int channels, int application) {
    return OpusJNI.opus_encoder_init(SWIGTYPE_p_OpusEncoder.getCPtr(st), Fs, channels, application);
  }

  public static int opus_encode(SWIGTYPE_p_OpusEncoder st, short[] pcm, int frame_size, byte[] data, int max_data_bytes) {
    return OpusJNI.opus_encode(SWIGTYPE_p_OpusEncoder.getCPtr(st), pcm, frame_size, data, max_data_bytes);
  }

  public static int opus_encode_float(SWIGTYPE_p_OpusEncoder st, float[] pcm, int frame_size, byte[] data, int max_data_bytes) {
    return OpusJNI.opus_encode_float(SWIGTYPE_p_OpusEncoder.getCPtr(st), pcm, frame_size, data, max_data_bytes);
  }

  public static void opus_encoder_destroy(SWIGTYPE_p_OpusEncoder st) {
    OpusJNI.opus_encoder_destroy(SWIGTYPE_p_OpusEncoder.getCPtr(st));
  }

  public static int opus_encoder_ctl(SWIGTYPE_p_OpusEncoder st, int request, int[] value) {
    return OpusJNI.opus_encoder_ctl(SWIGTYPE_p_OpusEncoder.getCPtr(st), request, value);
  }

  public static int opus_decoder_get_size(int channels) {
    return OpusJNI.opus_decoder_get_size(channels);
  }

  public static SWIGTYPE_p_OpusDecoder opus_decoder_create(int Fs, int channels, int[] error) {
    long cPtr = OpusJNI.opus_decoder_create(Fs, channels, error);
    return (cPtr == 0) ? null : new SWIGTYPE_p_OpusDecoder(cPtr, false);
  }

  public static int opus_decoder_init(SWIGTYPE_p_OpusDecoder st, int Fs, int channels) {
    return OpusJNI.opus_decoder_init(SWIGTYPE_p_OpusDecoder.getCPtr(st), Fs, channels);
  }

  public static int opus_decode(SWIGTYPE_p_OpusDecoder st, byte[] data, int len, short[] pcm, int frame_size, int decode_fec) {
    return OpusJNI.opus_decode(SWIGTYPE_p_OpusDecoder.getCPtr(st), data, len, pcm, frame_size, decode_fec);
  }

  public static int opus_decode_float(SWIGTYPE_p_OpusDecoder st, byte[] data, int len, float[] pcm, int frame_size, int decode_fec) {
    return OpusJNI.opus_decode_float(SWIGTYPE_p_OpusDecoder.getCPtr(st), data, len, pcm, frame_size, decode_fec);
  }

  public static int opus_decoder_ctl(SWIGTYPE_p_OpusDecoder st, int request) {
    return OpusJNI.opus_decoder_ctl(SWIGTYPE_p_OpusDecoder.getCPtr(st), request);
  }

  public static void opus_decoder_destroy(SWIGTYPE_p_OpusDecoder st) {
    OpusJNI.opus_decoder_destroy(SWIGTYPE_p_OpusDecoder.getCPtr(st));
  }

  public static int opus_packet_parse(byte[] data, int len, byte[] out_toc, SWIGTYPE_p_p_unsigned_char frames, SWIGTYPE_p_short size, int[] payload_offset) {
    return OpusJNI.opus_packet_parse(data, len, out_toc, SWIGTYPE_p_p_unsigned_char.getCPtr(frames), SWIGTYPE_p_short.getCPtr(size), payload_offset);
  }

  public static int opus_packet_get_bandwidth(byte[] data) {
    return OpusJNI.opus_packet_get_bandwidth(data);
  }

  public static int opus_packet_get_samples_per_frame(byte[] data, int Fs) {
    return OpusJNI.opus_packet_get_samples_per_frame(data, Fs);
  }

  public static int opus_packet_get_nb_channels(byte[] data) {
    return OpusJNI.opus_packet_get_nb_channels(data);
  }

  public static int opus_packet_get_nb_frames(byte[] packet, int len) {
    return OpusJNI.opus_packet_get_nb_frames(packet, len);
  }

  public static int opus_packet_get_nb_samples(byte[] packet, int len, int Fs) {
    return OpusJNI.opus_packet_get_nb_samples(packet, len, Fs);
  }

  public static int opus_decoder_get_nb_samples(SWIGTYPE_p_OpusDecoder dec, byte[] packet, int len) {
    return OpusJNI.opus_decoder_get_nb_samples(SWIGTYPE_p_OpusDecoder.getCPtr(dec), packet, len);
  }

  public static void opus_pcm_soft_clip(float[] pcm, int frame_size, int channels, float[] softclip_mem) {
    OpusJNI.opus_pcm_soft_clip(pcm, frame_size, channels, softclip_mem);
  }

  public static int opus_repacketizer_get_size() {
    return OpusJNI.opus_repacketizer_get_size();
  }

  public static SWIGTYPE_p_OpusRepacketizer opus_repacketizer_init(SWIGTYPE_p_OpusRepacketizer rp) {
    long cPtr = OpusJNI.opus_repacketizer_init(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp));
    return (cPtr == 0) ? null : new SWIGTYPE_p_OpusRepacketizer(cPtr, false);
  }

  public static SWIGTYPE_p_OpusRepacketizer opus_repacketizer_create() {
    long cPtr = OpusJNI.opus_repacketizer_create();
    return (cPtr == 0) ? null : new SWIGTYPE_p_OpusRepacketizer(cPtr, false);
  }

  public static void opus_repacketizer_destroy(SWIGTYPE_p_OpusRepacketizer rp) {
    OpusJNI.opus_repacketizer_destroy(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp));
  }

  public static int opus_repacketizer_cat(SWIGTYPE_p_OpusRepacketizer rp, byte[] data, int len) {
    return OpusJNI.opus_repacketizer_cat(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp), data, len);
  }

  public static int opus_repacketizer_out_range(SWIGTYPE_p_OpusRepacketizer rp, int begin, int end, byte[] data, int maxlen) {
    return OpusJNI.opus_repacketizer_out_range(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp), begin, end, data, maxlen);
  }

  public static int opus_repacketizer_get_nb_frames(SWIGTYPE_p_OpusRepacketizer rp) {
    return OpusJNI.opus_repacketizer_get_nb_frames(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp));
  }

  public static int opus_repacketizer_out(SWIGTYPE_p_OpusRepacketizer rp, byte[] data, int maxlen) {
    return OpusJNI.opus_repacketizer_out(SWIGTYPE_p_OpusRepacketizer.getCPtr(rp), data, maxlen);
  }

}