Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2007-11-14 14:59:22 +0300
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2007-11-14 14:59:22 +0300
commit15616e519e7f11d12b1b9aebf42eade740abad9d (patch)
tree4ca088c039af01c46bd6ddfa1fa09135deb69877 /include
parent09dfc4929e1f6a248cad986d04696361e5155bc4 (diff)
fixed-point: Patch by Thom Johansen to convert stereo decoding to fixed-point,
plus, my own ugly API hack to actually maintain compatibility. git-svn-id: http://svn.xiph.org/trunk/speex@14137 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'include')
-rw-r--r--include/speex/speex_stereo.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/speex/speex_stereo.h b/include/speex/speex_stereo.h
index 45da338..a259713 100644
--- a/include/speex/speex_stereo.h
+++ b/include/speex/speex_stereo.h
@@ -46,7 +46,7 @@
extern "C" {
#endif
-/** State used for decoding (intensity) stereo information */
+/** If you access any of these fields directly, I'll personally come and bite you */
typedef struct SpeexStereoState {
float balance; /**< Left/right balance info */
float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */
@@ -56,9 +56,18 @@ typedef struct SpeexStereoState {
float reserved2; /**< Reserved for future use */
} SpeexStereoState;
-/** Initialization value for a stereo state */
+/** Deprecated. Use speex_stereo_state_init() instead. */
#define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0}
+/** Initialise/create a stereo stereo state */
+SpeexStereoState *speex_stereo_state_init();
+
+/** Reset/re-initialise an already allocated stereo state */
+void speex_stereo_state_reset(SpeexStereoState *stereo);
+
+/** Destroy a stereo stereo state */
+void speex_stereo_state_destroy(SpeexStereoState *stereo);
+
/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits);