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

Making the "data" argument to celt_decode() const as pointed out by Bjoern

Rasmussen.
parent d27e6e34
......@@ -911,10 +911,10 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16_t * restrict
}
#ifdef FIXED_POINT
int celt_decode(CELTDecoder * restrict st, unsigned char *data, int len, celt_int16_t * restrict pcm)
int celt_decode(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16_t * restrict pcm)
{
#else
int celt_decode_float(CELTDecoder * restrict st, unsigned char *data, int len, celt_sig_t * restrict pcm)
int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int len, celt_sig_t * restrict pcm)
{
#endif
int i, c, N, N4;
......@@ -1088,7 +1088,7 @@ int celt_decode_float(CELTDecoder * restrict st, unsigned char *data, int len, c
#ifdef FIXED_POINT
#ifndef DISABLE_FLOAT_API
int celt_decode_float(CELTDecoder * restrict st, unsigned char *data, int len, float * restrict pcm)
int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm)
{
int j, ret;
const int C = CHANNELS(st->mode);
......@@ -1106,7 +1106,7 @@ int celt_decode_float(CELTDecoder * restrict st, unsigned char *data, int len, f
}
#endif /*DISABLE_FLOAT_API*/
#else
int celt_decode(CELTDecoder * restrict st, unsigned char *data, int len, celt_int16_t * restrict pcm)
int celt_decode(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16_t * restrict pcm)
{
int j, ret;
VARDECL(celt_sig_t, out);
......
......@@ -222,7 +222,7 @@ EXPORT void celt_decoder_destroy(CELTDecoder *st);
returned here in float format.
@return Error code.
*/
EXPORT int celt_decode_float(CELTDecoder *st, unsigned char *data, int len, float *pcm);
EXPORT int celt_decode_float(CELTDecoder *st, const unsigned char *data, int len, float *pcm);
/** Decodes a frame of audio.
@param st Decoder state
......@@ -233,7 +233,7 @@ EXPORT int celt_decode_float(CELTDecoder *st, unsigned char *data, int len, floa
returned here in 16-bit PCM format (native endian).
@return Error code.
*/
EXPORT int celt_decode(CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm);
EXPORT int celt_decode(CELTDecoder *st, const unsigned char *data, int len, celt_int16_t *pcm);
/* @} */
......
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