shithub: opus

Download patch

ref: 4424b5a80359bbf68491d0f6429c53b45511988f
parent: 084a5cc626e18e63019860b0b58208bb42df79c9
author: Jean-Marc Valin <[email protected]>
date: Tue Jul 6 15:37:23 EDT 2010

Updating DISABLE_FLOAT_API use

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -1177,10 +1177,12 @@
    return celt_encode_with_ec(st, pcm, NULL, frame_size, compressed, nbCompressedBytes, NULL);
 }
 
+#ifndef DISABLE_FLOAT_API
 int celt_encode_float(CELTEncoder * restrict st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes)
 {
    return celt_encode_with_ec_float(st, pcm, NULL, frame_size, compressed, nbCompressedBytes, NULL);
 }
+#endif /* DISABLE_FLOAT_API */
 
 int celt_encode_resynthesis(CELTEncoder * restrict st, const celt_int16 * pcm, celt_int16 * optional_resynthesis, int frame_size, unsigned char *compressed, int nbCompressedBytes)
 {
@@ -1187,10 +1189,12 @@
    return celt_encode_with_ec(st, pcm, optional_resynthesis, frame_size, compressed, nbCompressedBytes, NULL);
 }
 
+#ifndef DISABLE_FLOAT_API
 int celt_encode_resynthesis_float(CELTEncoder * restrict st, const float * pcm, float * optional_resynthesis, int frame_size, unsigned char *compressed, int nbCompressedBytes)
 {
    return celt_encode_with_ec_float(st, pcm, optional_resynthesis, frame_size, compressed, nbCompressedBytes, NULL);
 }
+#endif /* DISABLE_FLOAT_API */
 
 
 int celt_encoder_ctl(CELTEncoder * restrict st, int request, ...)
@@ -1888,10 +1892,12 @@
    return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL);
 }
 
+#ifndef DISABLE_FLOAT_API
 int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm, int frame_size)
 {
    return celt_decode_with_ec_float(st, data, len, pcm, frame_size, NULL);
 }
+#endif /* DISABLE_FLOAT_API */
 
 int celt_decoder_ctl(CELTDecoder * restrict st, int request, ...)
 {