From 6324072247d51667765555856ea10f5045ef90c9 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 26 Oct 2005 13:03:17 +0000 Subject: more doxygenification (issue #5513) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6852 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- codecs/codec_alaw.c | 107 ++++++++++++++++++++++------------------------------ 1 file changed, 45 insertions(+), 62 deletions(-) (limited to 'codecs/codec_alaw.c') diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c index 5ada484fc..13506721d 100755 --- a/codecs/codec_alaw.c +++ b/codecs/codec_alaw.c @@ -16,9 +16,9 @@ * at the top of the source tree. */ -/* +/*! \file * - * codec_alaw.c - translate between signed linear and alaw + * \brief codec_alaw.c - translate between signed linear and alaw * */ @@ -56,22 +56,20 @@ static int useplc = 0; #include "slin_ulaw_ex.h" #include "ulaw_slin_ex.h" -/* - * Private workspace for translating signed linear signals to alaw. +/*! + * \brief Private workspace for translating signed linear signals to alaw. */ - struct alaw_encoder_pvt { struct ast_frame f; - char offset[AST_FRIENDLY_OFFSET]; /* Space to build offset */ - unsigned char outbuf[BUFFER_SIZE]; /* Encoded alaw, two nibbles to a word */ + char offset[AST_FRIENDLY_OFFSET]; /*!< Space to build offset */ + unsigned char outbuf[BUFFER_SIZE]; /*!< Encoded alaw, two nibbles to a word */ int tail; }; -/* - * Private workspace for translating alaw signals to signed linear. +/*! + * \brief Private workspace for translating alaw signals to signed linear. */ - struct alaw_decoder_pvt { struct ast_frame f; @@ -81,8 +79,8 @@ struct alaw_decoder_pvt plc_state_t plc; }; -/* - * alawToLin_New +/*! + * \brief alawToLin_New * Create a new instance of alaw_decoder_pvt. * * Results: @@ -92,8 +90,7 @@ struct alaw_decoder_pvt * None. */ -static struct ast_translator_pvt * -alawtolin_new (void) +static struct ast_translator_pvt * alawtolin_new (void) { struct alaw_decoder_pvt *tmp; tmp = malloc (sizeof (struct alaw_decoder_pvt)); @@ -108,8 +105,8 @@ alawtolin_new (void) return (struct ast_translator_pvt *) tmp; } -/* - * LinToalaw_New +/*! + * \brief LinToalaw_New * Create a new instance of alaw_encoder_pvt. * * Results: @@ -119,8 +116,7 @@ alawtolin_new (void) * None. */ -static struct ast_translator_pvt * -lintoalaw_new (void) +static struct ast_translator_pvt * lintoalaw_new (void) { struct alaw_encoder_pvt *tmp; tmp = malloc (sizeof (struct alaw_encoder_pvt)); @@ -134,8 +130,8 @@ lintoalaw_new (void) return (struct ast_translator_pvt *) tmp; } -/* - * alawToLin_FrameIn +/*! + * \brief alawToLin_FrameIn * Fill an input buffer with packed 4-bit alaw values if there is room * left. * @@ -181,8 +177,8 @@ alawtolin_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) return 0; } -/* - * alawToLin_FrameOut +/*! + * \brief alawToLin_FrameOut * Convert 4-bit alaw encoded signals to 16-bit signed linear. * * Results: @@ -193,8 +189,7 @@ alawtolin_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) * None. */ -static struct ast_frame * -alawtolin_frameout (struct ast_translator_pvt *pvt) +static struct ast_frame * alawtolin_frameout (struct ast_translator_pvt *pvt) { struct alaw_decoder_pvt *tmp = (struct alaw_decoder_pvt *) pvt; @@ -213,8 +208,8 @@ alawtolin_frameout (struct ast_translator_pvt *pvt) return &tmp->f; } -/* - * LinToalaw_FrameIn +/*! + * \brief LinToalaw_FrameIn * Fill an input buffer with 16-bit signed linear PCM values. * * Results: @@ -224,8 +219,7 @@ alawtolin_frameout (struct ast_translator_pvt *pvt) * tmp->tail is number of signal values in the input buffer. */ -static int -lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) +static int lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) { struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt; int x; @@ -242,8 +236,8 @@ lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) return 0; } -/* - * LinToalaw_FrameOut +/*! + * \brief LinToalaw_FrameOut * Convert a buffer of raw 16-bit signed linear PCM to a buffer * of 4-bit alaw packed two to a byte (Big Endian). * @@ -254,8 +248,7 @@ lintoalaw_framein (struct ast_translator_pvt *pvt, struct ast_frame *f) * Leftover inbuf data gets packed, tail gets updated. */ -static struct ast_frame * -lintoalaw_frameout (struct ast_translator_pvt *pvt) +static struct ast_frame * lintoalaw_frameout (struct ast_translator_pvt *pvt) { struct alaw_encoder_pvt *tmp = (struct alaw_encoder_pvt *) pvt; @@ -274,12 +267,11 @@ lintoalaw_frameout (struct ast_translator_pvt *pvt) } -/* - * alawToLin_Sample +/*! + * \brief alawToLin_Sample */ -static struct ast_frame * -alawtolin_sample (void) +static struct ast_frame * alawtolin_sample (void) { static struct ast_frame f; f.frametype = AST_FRAME_VOICE; @@ -293,12 +285,11 @@ alawtolin_sample (void) return &f; } -/* - * LinToalaw_Sample +/*! + * \brief LinToalaw_Sample */ -static struct ast_frame * -lintoalaw_sample (void) +static struct ast_frame * lintoalaw_sample (void) { static struct ast_frame f; f.frametype = AST_FRAME_VOICE; @@ -313,8 +304,8 @@ lintoalaw_sample (void) return &f; } -/* - * alaw_Destroy +/*! + * \brief alaw_Destroy * Destroys a private workspace. * * Results: @@ -324,16 +315,15 @@ lintoalaw_sample (void) * None. */ -static void -alaw_destroy (struct ast_translator_pvt *pvt) +static void alaw_destroy (struct ast_translator_pvt *pvt) { free (pvt); localusecnt--; ast_update_use_count (); } -/* - * The complete translator for alawToLin. +/*! + * \brief The complete translator for alawToLin. */ static struct ast_translator alawtolin = { @@ -348,8 +338,8 @@ static struct ast_translator alawtolin = { alawtolin_sample }; -/* - * The complete translator for LinToalaw. +/*! + * \brief The complete translator for LinToalaw. */ static struct ast_translator lintoalaw = { @@ -364,8 +354,7 @@ static struct ast_translator lintoalaw = { lintoalaw_sample }; -static void -parse_config(void) +static void parse_config(void) { struct ast_config *cfg; struct ast_variable *var; @@ -385,15 +374,13 @@ parse_config(void) } } -int -reload(void) +int reload(void) { parse_config(); return 0; } -int -unload_module (void) +int unload_module (void) { int res; ast_mutex_lock (&localuser_lock); @@ -406,8 +393,7 @@ unload_module (void) return res; } -int -load_module (void) +int load_module (void) { int res; parse_config(); @@ -423,22 +409,19 @@ load_module (void) * Return a description of this module. */ -char * -description (void) +char * description (void) { return tdesc; } -int -usecount (void) +int usecount (void) { int res; STANDARD_USECOUNT (res); return res; } -char * -key () +char * key () { return ASTERISK_GPL_KEY; } -- cgit v1.2.3