ref: f997ad51dc524ee8663f71dd41322cebdbe6c92a
parent: abe043f0a1a8dd8ce4ae273ea0043e2c057f1aae
author: Jean-Marc Valin <[email protected]>
date: Thu Jan 31 11:47:16 EST 2008
Mode info
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -278,8 +278,6 @@
{
stereo_mix(st->mode, X, bandE, 1);
stereo_mix(st->mode, P, bandE, 1);
- //haar1(X, B*N*C, 1);
- //haar1(P, B*N*C, 1);
}
/* Simulates intensity stereo */
//for (i=30;i<N*B;i++)
--- a/libcelt/celt.h
+++ b/libcelt/celt.h
@@ -44,7 +44,9 @@
#define CELT_INTERNAL_ERROR -3
#define CELT_CORRUPTED_DATA -4
-
+#define CELT_GET_FRAME_SIZE 1000
+#define CELT_GET_LOOKAHEAD 1001
+
typedef struct CELTEncoder CELTEncoder;
typedef struct CELTDecoder CELTDecoder;
@@ -68,6 +70,11 @@
void celt_decoder_destroy(CELTDecoder *st);
int celt_decode(CELTDecoder *st, char *data, int len, celt_int16_t *pcm);
+
+
+/* Mode calls */
+
+int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value);
#ifdef __cplusplus
}
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -145,3 +145,18 @@
const CELTMode const *celt_mono = &mono_mode;
const CELTMode const *celt_stereo = &stereo_mode;
+
+
+int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value)
+{
+ switch (request)
+ {
+ case CELT_GET_FRAME_SIZE:
+ *value = mode->mdctSize;
+ break;
+ case CELT_GET_LOOKAHEAD:
+ *value = mode->overlap;
+ break;
+ }
+}
+