Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
6db6cbd4
Commit
6db6cbd4
authored
Apr 11, 2009
by
Jean-Marc Valin
Browse files
Making the "data" argument to celt_decode() const as pointed out by Bjoern
Rasmussen.
parent
d27e6e34
Changes
2
Hide whitespace changes
Inline
Side-by-side
libcelt/celt.c
View file @
6db6cbd4
...
...
@@ -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
);
...
...
libcelt/celt.h
View file @
6db6cbd4
...
...
@@ -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
);
/* @} */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment