OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // Bitrate 64 kbps and wideband mode (2) | 32 // Bitrate 64 kbps and wideband mode (2) |
33 G722enc_inst = (G722EncInst *) WebRtc_g722_encode_init( | 33 G722enc_inst = (G722EncInst *) WebRtc_g722_encode_init( |
34 (G722EncoderState*) G722enc_inst, 64000, 2); | 34 (G722EncoderState*) G722enc_inst, 64000, 2); |
35 if (G722enc_inst == NULL) { | 35 if (G722enc_inst == NULL) { |
36 return -1; | 36 return -1; |
37 } else { | 37 } else { |
38 return 0; | 38 return 0; |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 int WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst) | 42 int16_t WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst) |
43 { | 43 { |
44 // Free encoder memory | 44 // Free encoder memory |
45 return WebRtc_g722_encode_release((G722EncoderState*) G722enc_inst); | 45 return WebRtc_g722_encode_release((G722EncoderState*) G722enc_inst); |
46 } | 46 } |
47 | 47 |
48 int16_t WebRtcG722_Encode(G722EncInst *G722enc_inst, | 48 int16_t WebRtcG722_Encode(G722EncInst *G722enc_inst, |
49 const int16_t* speechIn, | 49 const int16_t* speechIn, |
50 int16_t len, | 50 int16_t len, |
51 uint8_t* encoded) | 51 uint8_t* encoded) |
52 { | 52 { |
(...skipping 19 matching lines...) Expand all Loading... |
72 // Bitrate 64 kbps and wideband mode (2) | 72 // Bitrate 64 kbps and wideband mode (2) |
73 G722dec_inst = (G722DecInst *) WebRtc_g722_decode_init( | 73 G722dec_inst = (G722DecInst *) WebRtc_g722_decode_init( |
74 (G722DecoderState*) G722dec_inst, 64000, 2); | 74 (G722DecoderState*) G722dec_inst, 64000, 2); |
75 if (G722dec_inst == NULL) { | 75 if (G722dec_inst == NULL) { |
76 return -1; | 76 return -1; |
77 } else { | 77 } else { |
78 return 0; | 78 return 0; |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 int WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst) | 82 int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst) |
83 { | 83 { |
84 // Free encoder memory | 84 // Free encoder memory |
85 return WebRtc_g722_decode_release((G722DecoderState*) G722dec_inst); | 85 return WebRtc_g722_decode_release((G722DecoderState*) G722dec_inst); |
86 } | 86 } |
87 | 87 |
88 int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst, | 88 int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst, |
89 const uint8_t *encoded, | 89 const uint8_t *encoded, |
90 int16_t len, | 90 int16_t len, |
91 int16_t *decoded, | 91 int16_t *decoded, |
92 int16_t *speechType) | 92 int16_t *speechType) |
(...skipping 12 matching lines...) Expand all Loading... |
105 { | 105 { |
106 strcpy(versionStr, version); | 106 strcpy(versionStr, version); |
107 return 0; | 107 return 0; |
108 } | 108 } |
109 else | 109 else |
110 { | 110 { |
111 return -1; | 111 return -1; |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
OLD | NEW |