Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r--src/opus_decoder.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 5dd3b5ab..cb6fef2f 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -73,6 +73,7 @@ OpusDecoder *opus_decoder_create(int Fs, int channels)
return st;
}
+
int opus_decode(OpusDecoder *st, const unsigned char *data,
int len, short *pcm, int frame_size)
{
@@ -199,6 +200,11 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
for (i=0;i<frame_size*st->channels;i++)
pcm[i] = ADD_SAT16(pcm[i], pcm_celt[i]);
}
+
+#if OPUS_TEST_RANGE_CODER_STATE
+ st->rangeFinal = dec.rng;
+#endif
+
return celt_ret<0 ? celt_ret : audiosize;
}
@@ -247,3 +253,10 @@ void opus_decoder_destroy(OpusDecoder *st)
{
free(st);
}
+
+#if OPUS_TEST_RANGE_CODER_STATE
+int opus_decoder_get_final_range(OpusDecoder *st)
+{
+ return st->rangeFinal;
+}
+#endif