osmo-gmr 0.2.104-2b98 Osmocom GMR-1

codec.h
Go to the documentation of this file.
1/* GMR-1 AMBE vocoder */
2
3/* (C) 2011-2019 by Sylvain Munaut <tnt@246tNt.com>
4 * All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __OSMO_GMR1_CODEC_H__
21#define __OSMO_GMR1_CODEC_H__
22
32#include <stdint.h>
33
34
35 struct gmr1_codec;
36
37 struct gmr1_codec *gmr1_codec_alloc(void);
38 void gmr1_codec_release(struct gmr1_codec *codec);
39
40 int gmr1_codec_decode_frame(struct gmr1_codec *codec,
41 int16_t *audio, int N,
42 const uint8_t *frame, int bad);
43
44 int gmr1_codec_decode_dtx(struct gmr1_codec *codec,
45 int16_t *audio, int N);
46
47
50#endif /* __OSMO_GMR1_CODEC_H__ */
gmr1_codec_decode_dtx
int gmr1_codec_decode_dtx(struct gmr1_codec *codec, int16_t *audio, int N)
Generates audio for DTX period.
Definition: codec.c:97
gmr1_codec_alloc
struct gmr1_codec * gmr1_codec_alloc(void)
Allocates and inits a codec object.
Definition: codec.c:48
gmr1_codec_decode_frame
int gmr1_codec_decode_frame(struct gmr1_codec *codec, int16_t *audio, int N, const uint8_t *frame, int bad)
Decodes an AMBE frame to audio.
Definition: codec.c:84
gmr1_codec_release
void gmr1_codec_release(struct gmr1_codec *codec)
Release a codec object created by gmr1_codec_alloc.
Definition: codec.c:65
gmr1_codec
Structure for GMR1 codec state.
Definition: codec.c:39