ref: 0c79f09e142cfc9aff807a981b29b81668c21f9d
parent: c57ac95f174df44f16c7ca72ea195bb338941f12
author: Jean-Marc Valin <[email protected]>
date: Fri Dec 7 13:02:56 EST 2007
debug code
--- a/libcelt/testcelt.c
+++ b/libcelt/testcelt.c
@@ -43,6 +43,8 @@
short in[FRAME_SIZE];
CELTEncoder *enc;
CELTDecoder *dec;
+ int len;
+ char *data;
inFile = argv[1];
fin = fopen(inFile, "rb");
@@ -54,14 +56,16 @@
while (!feof(fin))
{
- int len;
- char *data;
fread(in, sizeof(short), FRAME_SIZE, fin);
celt_encode(enc, in);
data = celt_encoder_get_bytes(enc, &len);
+ //printf ("%d\n", len);
celt_decode(dec, data, len, in);
fwrite(in, sizeof(short), FRAME_SIZE, fout);
}
+ //data = celt_encoder_get_bytes(enc, &len);
+ //printf ("%d bytes total\n", len);
+
celt_encoder_destroy(enc);
celt_decoder_destroy(dec);
fclose(fin);