39#define OUTBUF_SAMPLES 11520
87 .sample_rate = 192000,
116 unsigned int in_samples;
131 pvt->
datalen += out_samples * 2;
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
static struct ast_translator * translators
static int resamp_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
static int load_module(void)
static int unload_module(void)
static void resamp_destroy(struct ast_trans_pvt *pvt)
static struct ast_codec codec_list[]
static int resamp_new(struct ast_trans_pvt *pvt)
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
EXPORT void speex_resampler_destroy(SpeexResamplerState *st)
EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
EXPORT SpeexResamplerState * speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err)
Create a new resampler with integer input and output rates.
Represents a media codec within Asterisk.
unsigned int sample_rate
Sample rate (number of samples carried in a second)
const char * name
Name for this codec.
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
struct ast_translator * t
int datalen
actual space used in outbuf
union ast_trans_pvt::@287 outbuf
Descriptor of a translator.
struct ast_codec src_codec
struct ast_codec dst_codec
Support for translation of data formats. translate.c.
#define ast_register_translator(t)
See __ast_register_translator()
int ast_unregister_translator(struct ast_translator *t)
Unregister a translator Unregisters the given translator.