ref: 6db6cbd4f0fd094170a1aefac73f28f58a2bcbfd
parent: d27e6e34a5f88f69a31a3b7c0624119d09255aa9
author: Jean-Marc Valin <[email protected]>
date: Sat Apr 11 18:01:20 EDT 2009
Making the "data" argument to celt_decode() const as pointed out by Bjoern Rasmussen.
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -911,10 +911,10 @@
}
#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 @@
#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 @@
}
#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);
--- a/libcelt/celt.h
+++ b/libcelt/celt.h
@@ -222,7 +222,7 @@
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 @@
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);
/* @} */