From e4ed9f5808135892f95187473da10e3c9011ccb5 Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 29 Oct 2009 21:58:57 +0000 Subject: [PATCH] bring CELT up to the latest build we need more testers git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15278 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/codecs/mod_celt/Makefile | 2 +- src/mod/codecs/mod_celt/mod_celt.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mod/codecs/mod_celt/Makefile b/src/mod/codecs/mod_celt/Makefile index 2bc17f3444..8aa599e80d 100644 --- a/src/mod/codecs/mod_celt/Makefile +++ b/src/mod/codecs/mod_celt/Makefile @@ -1,6 +1,6 @@ BASE=../../../.. -CELT=celt-0.6.1 +CELT=celt-0.7.0 CELT_DIR=$(BASE)/libs/$(CELT) LOCAL_CFLAGS=-I$(CELT_DIR)/libcelt diff --git a/src/mod/codecs/mod_celt/mod_celt.c b/src/mod/codecs/mod_celt/mod_celt.c index 058e5d347f..548c0feb78 100644 --- a/src/mod/codecs/mod_celt/mod_celt.c +++ b/src/mod/codecs/mod_celt/mod_celt.c @@ -53,7 +53,7 @@ static switch_status_t switch_celt_init(switch_codec_t *codec, switch_codec_flag return SWITCH_STATUS_FALSE; } - context->mode_object = celt_mode_create(codec->implementation->actual_samples_per_second, 1, codec->implementation->samples_per_packet, NULL); + context->mode_object = celt_mode_create(codec->implementation->actual_samples_per_second, codec->implementation->samples_per_packet, NULL); celt_mode_info(context->mode_object, CELT_GET_FRAME_SIZE, &context->frame_size); context->bytes_per_packet = (codec->implementation->bits_per_second * context->frame_size/codec->implementation->actual_samples_per_second + 4) / 8; @@ -81,11 +81,11 @@ static switch_status_t switch_celt_init(switch_codec_t *codec, switch_codec_flag codec->fmtp_out = switch_core_sprintf(codec->memory_pool, "bitrate=%d", bit_rate); */ if (encoding) { - context->encoder_object = celt_encoder_create(context->mode_object); + context->encoder_object = celt_encoder_create(context->mode_object, 1, NULL); } if (decoding) { - context->decoder_object = celt_decoder_create(context->mode_object); + context->decoder_object = celt_decoder_create(context->mode_object, 1, NULL); } codec->private_info = context; @@ -111,7 +111,7 @@ static switch_status_t switch_celt_encode(switch_codec_t *codec, return SWITCH_STATUS_FALSE; } - *encoded_data_len = (uint32_t) celt_encode(context->encoder_object, (celt_int16_t *)decoded_data, NULL, + *encoded_data_len = (uint32_t) celt_encode(context->encoder_object, (void *)decoded_data, NULL, (unsigned char *)encoded_data, context->bytes_per_packet); return SWITCH_STATUS_SUCCESS;