Skip to content
Snippets Groups Projects
Commit 9d8b5196 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Adds OPUS_GET_LOOKAHEAD

parent 63fd63d6
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,9 @@ extern "C" {
#define OPUS_GET_SIGNAL_REQUEST 25
#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __check_int_ptr(x)
#define OPUS_GET_LOOKAHEAD_REQUEST 27
#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __check_int_ptr(x)
typedef struct OpusEncoder OpusEncoder;
typedef struct OpusDecoder OpusDecoder;
......
......@@ -810,6 +810,12 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...)
*value = st->signal_type;
}
break;
case OPUS_GET_LOOKAHEAD_REQUEST:
{
int *value = va_arg(ap, int*);
*value = st->delay_compensation+st->Fs/400;
}
break;
default:
fprintf(stderr, "unknown opus_encoder_ctl() request: %d", request);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment