diff --git a/src/opus_projection_decoder.c b/src/opus_projection_decoder.c index e546bbe90..ebd463d27 100644 --- a/src/opus_projection_decoder.c +++ b/src/opus_projection_decoder.c @@ -210,24 +210,19 @@ OpusProjectionDecoder *opus_projection_decoder_create( } #ifdef FIXED_POINT -int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data, - opus_int32 len, opus_int16 *pcm, int frame_size, - int decode_fec) -{ - return opus_multistream_decode_native(get_multistream_decoder(st), data, len, - pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 0, - get_dec_demixing_matrix(st)); -} +#define OPTIONAL_CLIP 0 #else +#define OPTIONAL_CLIP 1 +#endif + int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data, opus_int32 len, opus_int16 *pcm, int frame_size, int decode_fec) { return opus_multistream_decode_native(get_multistream_decoder(st), data, len, - pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 1, + pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, OPTIONAL_CLIP, get_dec_demixing_matrix(st)); } -#endif #ifndef DISABLE_FLOAT_API int opus_projection_decode_float(OpusProjectionDecoder *st, const unsigned char *data, diff --git a/src/opus_projection_encoder.c b/src/opus_projection_encoder.c index 009b1fa09..cecabb4f8 100644 --- a/src/opus_projection_encoder.c +++ b/src/opus_projection_encoder.c @@ -393,25 +393,14 @@ int opus_projection_encode(OpusProjectionEncoder *st, const opus_int16 *pcm, } #ifndef DISABLE_FLOAT_API -#ifdef FIXED_POINT int opus_projection_encode_float(OpusProjectionEncoder *st, const float *pcm, int frame_size, unsigned char *data, opus_int32 max_data_bytes) { return opus_multistream_encode_native(get_multistream_encoder(st), opus_projection_copy_channel_in_float, pcm, frame_size, data, - max_data_bytes, 16, downmix_float, 1, get_mixing_matrix(st)); + max_data_bytes, MAX_ENCODING_DEPTH, downmix_float, 1, get_mixing_matrix(st)); } -#else -int opus_projection_encode_float(OpusProjectionEncoder *st, const float *pcm, - int frame_size, unsigned char *data, - opus_int32 max_data_bytes) -{ - return opus_multistream_encode_native(get_multistream_encoder(st), - opus_projection_copy_channel_in_float, pcm, frame_size, data, - max_data_bytes, 24, downmix_float, 1, get_mixing_matrix(st)); -} -#endif #endif void opus_projection_encoder_destroy(OpusProjectionEncoder *st)