diff options
author | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2008-01-17 14:43:05 +0300 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2008-01-17 14:43:05 +0300 |
commit | a76a0b23eb7001411c898fecee39744d605d9d09 (patch) | |
tree | a02d6880ae3fc01ec4b81e1601e07fddaa875d46 /libcelt/testcelt.c | |
parent | 649d5cc23bfd3ecd6198068e509fc2e882fa1488 (diff) |
Further simplified the API by passing the rate directly to the
encode function. Also, trying to properly flush the bit packer
(still some problems left).
Diffstat (limited to 'libcelt/testcelt.c')
-rw-r--r-- | libcelt/testcelt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libcelt/testcelt.c b/libcelt/testcelt.c index ae950b3..6718d32 100644 --- a/libcelt/testcelt.c +++ b/libcelt/testcelt.c @@ -55,19 +55,20 @@ int main(int argc, char *argv[]) /* Use mode4 for stereo and don't forget to change the value of CHANNEL above */ enc = celt_encoder_new(celt_mode0); dec = celt_decoder_new(celt_mode0); - //celt_encoder_set_output_size(enc, 48); while (!feof(fin)) { fread(in, sizeof(short), FRAME_SIZE*CHANNELS, fin); - len = celt_encode(enc, in, data); - printf ("%d\n", len); + len = celt_encode(enc, in, data, 32); + //printf ("\n"); + //printf ("%d\n", len); #if 1 /* this is to simulate packet loss */ if (rand()%100==-1) celt_decode(dec, NULL, len, in); else celt_decode(dec, data, len, in); + //printf ("\n"); #endif fwrite(in, sizeof(short), FRAME_SIZE*CHANNELS, fout); } |