correct please test

This commit is contained in:
Brian West 2011-01-05 16:48:11 -06:00
parent d3e7c2a63d
commit 231fbe5e7a
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
BASE=../../../..
CELT=celt-0.7.1
CELT=celt-0.10.0
CELT_DIR=$(switch_srcdir)/libs/$(CELT)
CELT_BUILDDIR=$(switch_builddir)/libs/$(CELT)

View File

@ -54,7 +54,7 @@ static switch_status_t switch_celt_init(switch_codec_t *codec, switch_codec_flag
}
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;
/*
@ -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, (void *) decoded_data, NULL,
*encoded_data_len = (uint32_t) celt_encode(context->encoder_object, (void *) decoded_data, codec->implementation->samples_per_packet,
(unsigned char *) encoded_data, context->bytes_per_packet);
return SWITCH_STATUS_SUCCESS;
@ -130,7 +130,7 @@ static switch_status_t switch_celt_decode(switch_codec_t *codec,
return SWITCH_STATUS_FALSE;
}
if (celt_decode(context->decoder_object, encoded_data, encoded_data_len, decoded_data)) {
if (celt_decode(context->decoder_object, encoded_data, encoded_data_len, decoded_data, codec->implementation->samples_per_packet)) {
return SWITCH_STATUS_GENERR;
}