Commit f997ad51 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Mode info

parent abe043f0
......@@ -278,8 +278,6 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
{
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++)
......
......@@ -44,7 +44,9 @@ extern "C" {
#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;
......@@ -69,6 +71,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
}
#endif
......
......@@ -145,3 +145,18 @@ static const CELTMode stereo_mode = {
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;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment