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

Rasmussen.
This commit is contained in:
Jean-Marc Valin 2009-04-11 22:01:20 -04:00
parent d27e6e34a5
commit 6db6cbd4f0
2 changed files with 6 additions and 6 deletions

View file

@ -911,10 +911,10 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16_t * restrict
} }
#ifdef FIXED_POINT #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 #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 #endif
int i, c, N, N4; 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 #ifdef FIXED_POINT
#ifndef DISABLE_FLOAT_API #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; int j, ret;
const int C = CHANNELS(st->mode); 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*/ #endif /*DISABLE_FLOAT_API*/
#else #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; int j, ret;
VARDECL(celt_sig_t, out); VARDECL(celt_sig_t, out);

View file

@ -222,7 +222,7 @@ EXPORT void celt_decoder_destroy(CELTDecoder *st);
returned here in float format. returned here in float format.
@return Error code. @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. /** Decodes a frame of audio.
@param st Decoder state @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). returned here in 16-bit PCM format (native endian).
@return Error code. @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);
/* @} */ /* @} */