diff options
Diffstat (limited to 'apps/codecs/libspeex/speex')
-rw-r--r-- | apps/codecs/libspeex/speex/speex_stereo.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/apps/codecs/libspeex/speex/speex_stereo.h b/apps/codecs/libspeex/speex/speex_stereo.h index 904e9b092e..b817a5535e 100644 --- a/apps/codecs/libspeex/speex/speex_stereo.h +++ b/apps/codecs/libspeex/speex/speex_stereo.h | |||
@@ -46,31 +46,28 @@ | |||
46 | extern "C" { | 46 | extern "C" { |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | /** State used for decoding (intensity) stereo information */ | 49 | /** If you access any of these fields directly, I'll personally come and bite you */ |
50 | typedef struct SpeexStereoState { | 50 | typedef struct SpeexStereoState { |
51 | #ifndef FIXED_POINT | ||
52 | float balance; /**< Left/right balance info */ | 51 | float balance; /**< Left/right balance info */ |
53 | float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ | 52 | float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ |
54 | float smooth_left; /**< Smoothed left channel gain */ | 53 | float smooth_left; /**< Smoothed left channel gain */ |
55 | float smooth_right; /**< Smoothed right channel gain */ | 54 | float smooth_right; /**< Smoothed right channel gain */ |
56 | float reserved1; /**< Reserved for future use */ | 55 | float reserved1; /**< Reserved for future use */ |
57 | float reserved2; /**< Reserved for future use */ | 56 | float reserved2; /**< Reserved for future use */ |
58 | #else | ||
59 | spx_int32_t balance; /**< Left/right balance info */ | ||
60 | spx_int16_t e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ | ||
61 | spx_int16_t smooth_left; /**< Smoothed left channel gain */ | ||
62 | spx_int16_t smooth_right; /**< Smoothed right channel gain */ | ||
63 | spx_int32_t reserved1; /**< Reserved for future use */ | ||
64 | spx_int32_t reserved2; /**< Reserved for future use */ | ||
65 | #endif | ||
66 | } SpeexStereoState; | 57 | } SpeexStereoState; |
67 | 58 | ||
68 | /** Initialization value for a stereo state */ | 59 | /** Deprecated. Use speex_stereo_state_init() instead. */ |
69 | #ifndef FIXED_POINT | ||
70 | #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} | 60 | #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} |
71 | #else | 61 | |
72 | #define SPEEX_STEREO_STATE_INIT {65536,16384,16384,16384,0,0} | 62 | /** Initialise/create a stereo stereo state */ |
73 | #endif | 63 | SpeexStereoState *speex_stereo_state_init(); |
64 | |||
65 | /** Reset/re-initialise an already allocated stereo state */ | ||
66 | void speex_stereo_state_reset(SpeexStereoState *stereo); | ||
67 | |||
68 | /** Destroy a stereo stereo state */ | ||
69 | void speex_stereo_state_destroy(SpeexStereoState *stereo); | ||
70 | |||
74 | /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */ | 71 | /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */ |
75 | void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits); | 72 | void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits); |
76 | 73 | ||