Commit d9458cd0 authored by Gregory Maxwell's avatar Gregory Maxwell
Browse files

Add a mode_info call to obtain the sampling rate of the current mode.

parent e4c05a4d
......@@ -87,6 +87,8 @@ extern "C" {
#define CELT_GET_LOOKAHEAD 1001
/** GET the number of channels used in the current mode */
#define CELT_GET_NB_CHANNELS 1002
/** GET the sample rate used in the current mode */
#define CELT_GET_SAMPLE_RATE 1003
/** GET the bit-stream version for compatibility check */
#define CELT_GET_BITSTREAM_VERSION 2000
......
......@@ -68,6 +68,9 @@ int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value)
case CELT_GET_BITSTREAM_VERSION:
*value = CELT_BITSTREAM_VERSION;
break;
case CELT_GET_SAMPLE_RATE:
*value = mode->Fs;
break;
default:
return CELT_UNIMPLEMENTED;
}
......
Markdown is supported
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