[xiph-cvs] cvs commit: speex/libspeex misc.h speex.h speex_callbacks.h speex_stereo.h
Jean-Marc Valin
jm at xiph.org
Mon Dec 30 22:07:33 PST 2002
jm 02/12/31 01:07:33
Modified: libspeex misc.h speex.h speex_callbacks.h speex_stereo.h
Log:
documentation update
Revision Changes Path
1.11 +1 -1 speex/libspeex/misc.h
Index: misc.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/misc.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- misc.h 2 Dec 2002 00:12:48 -0000 1.10
+++ misc.h 31 Dec 2002 06:07:33 -0000 1.11
@@ -36,7 +36,7 @@
#define MISC_H
#ifndef VERSION
-#define VERSION "Speex-1.0beta4"
+#define VERSION "speex-1.0rc1"
#endif
#ifndef RELEASE
<p><p>1.72 +17 -1 speex/libspeex/speex.h
Index: speex.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- speex.h 20 Dec 2002 08:24:46 -0000 1.71
+++ speex.h 31 Dec 2002 06:07:33 -0000 1.72
@@ -99,26 +99,40 @@
/**Define a handler function for in-band user-defined request*/
#define SPEEX_SET_USER_HANDLER 22
+/** Set sampling rate used in bit-rate computation */
#define SPEEX_SET_SAMPLING_RATE 24
+/** Get sampling rate used in bit-rate computation */
#define SPEEX_GET_SAMPLING_RATE 25
+/** Reset the encoder/decoder memories to zero*/
#define SPEEX_RESET_STATE 26
+/** Get VBR info (mostly used internally) */
#define SPEEX_GET_RELATIVE_QUALITY 29
+/** Set VAD status (1 for on, 0 for off) */
#define SPEEX_SET_VAD 30
+
+/** Get VAD status (1 for on, 0 for off) */
#define SPEEX_GET_VAD 31
+/** Set Average Bit-Rate (ABR) to n bits per seconds */
#define SPEEX_SET_ABR 32
+/** Get Average Bit-Rate (ABR) setting (in bps) */
#define SPEEX_GET_ABR 33
+/** Set DTX status (1 for on, 0 for off) */
#define SPEEX_SET_DTX 34
+/** Get DTX status (1 for on, 0 for off) */
#define SPEEX_GET_DTX 35
- /* Used internally, not to be used in applications */
+/* Used internally, not to be used in applications */
+/** Used internally*/
#define SPEEX_GET_PI_GAIN 100
+/** Used internally*/
#define SPEEX_GET_EXC 101
+/** Used internally*/
#define SPEEX_GET_INNOV 102
@@ -245,6 +259,7 @@
* @param state Encoder state
* @param request ioctl-type request (one of the SPEEX_* macros)
* @param ptr Data exchanged to-from function
+ * @return 0 if frame needs not be transmitted (DTX only), 1 otherwise
*/
void speex_encoder_ctl(void *state, int request, void *ptr);
@@ -280,6 +295,7 @@
* @param state Decoder state
* @param request ioctl-type request (one of the SPEEX_* macros)
* @param ptr Data exchanged to-from function
+ * @return 0 for no error, 1 if a terminator is reached, 2 for another error
*/
void speex_decoder_ctl(void *state, int request, void *ptr);
<p><p>1.7 +23 -5 speex/libspeex/speex_callbacks.h
Index: speex_callbacks.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_callbacks.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- speex_callbacks.h 7 Nov 2002 06:10:37 -0000 1.6
+++ speex_callbacks.h 31 Dec 2002 06:07:33 -0000 1.7
@@ -42,50 +42,68 @@
extern "C" {
#endif
+/** Total number of callbacks */
#define SPEEX_MAX_CALLBACKS 16
/* Describes all the in-band requests */
/*These are 1-bit requests*/
+/** Request for perceptual enhancement (1 for on, 0 for off) */
#define SPEEX_INBAND_ENH_REQUEST 0
-#define SPEEX_INBAND_VBR_REQUEST 1
+/** Reserved */
+#define SPEEX_INBAND_RESERVED1 1
/*These are 4-bit requests*/
+/** Request for a mode change */
#define SPEEX_INBAND_MODE_REQUEST 2
+/** Request for a low mode change */
#define SPEEX_INBAND_LOW_MODE_REQUEST 3
+/** Request for a high mode change */
#define SPEEX_INBAND_HIGH_MODE_REQUEST 4
+/** Request for VBR (1 on, 0 off) */
#define SPEEX_INBAND_VBR_QUALITY_REQUEST 5
+/** Request to be sent acknowledge */
#define SPEEX_INBAND_ACKNOWLEDGE_REQUEST 6
+/** Request for VBR (1 for on, 0 for off) */
+#define SPEEX_INBAND_VBR_REQUEST 7
/*These are 8-bit requests*/
/** Send a character in-band */
#define SPEEX_INBAND_CHAR 8
+/** Intensity stereo information */
#define SPEEX_INBAND_STEREO 9
/*These are 16-bit requests*/
+/** Transmit max bit-rate allowed */
#define SPEEX_INBAND_MAX_BITRATE 10
/*These are 32-bit requests*/
+/** Acknowledge packet reception */
#define SPEEX_INBAND_ACKNOWLEDGE 12
/** Callback function type */
typedef int (*speex_callback_func)(SpeexBits *bits, void *state, void *data);
+/** Callback information */
typedef struct SpeexCallback {
- int callback_id;
- speex_callback_func func;
- void *data;
+ int callback_id; /**< ID associated to the callback */
+ speex_callback_func func; /**< Callback handler function */
+ void *data; /**< Data that will be sent to the handler */
} SpeexCallback;
+/** Handle in-band request */
int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state);
+/** Standard handler for mode request (change mode, no questions asked) */
int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data);
+/** Standard handler for high mode request (change high mode, no questions asked) */
int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data);
+/** Standard handler for in-band characters (write to stderr) */
int speex_std_char_handler(SpeexBits *bits, void *state, void *data);
-
+/** Default handler for user-defined requests: in this case, just ignore */
int speex_default_user_handler(SpeexBits *bits, void *state, void *data);
#ifdef __cplusplus
<p><p>1.4 +1 -0 speex/libspeex/speex_stereo.h
Index: speex_stereo.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_stereo.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- speex_stereo.h 11 Nov 2002 06:05:22 -0000 1.3
+++ speex_stereo.h 31 Dec 2002 06:07:33 -0000 1.4
@@ -43,6 +43,7 @@
float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */
} SpeexStereoState;
+/** Initialization value for a stereo state */
#define SPEEX_STEREO_STATE_INIT {1,.5}
/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list