diff options
| author | Dan Everton <dan@iocaine.org> | 2007-03-12 11:54:07 +0000 |
|---|---|---|
| committer | Dan Everton <dan@iocaine.org> | 2007-03-12 11:54:07 +0000 |
| commit | 879070f89e004be03cef53ad7f61610e02e7aa00 (patch) | |
| tree | eccbcce2722da50eb473c78cf9ce16fad6602c00 /apps/codecs/libspeex/testresample.c | |
| parent | 19bba742e789e669d4cfc15ed3a5cef4aa64199d (diff) | |
| download | rockbox-879070f89e004be03cef53ad7f61610e02e7aa00.zip rockbox-879070f89e004be03cef53ad7f61610e02e7aa00.tar.gz rockbox-879070f89e004be03cef53ad7f61610e02e7aa00.tar.bz2 rockbox-879070f89e004be03cef53ad7f61610e02e7aa00.tar.xz | |
* Clean up speex.c a little.
* Sync to Speex SVN 12735 which includes some of our warnings fixes.
* Move decoder output to IRAM. Not much perfomance gain though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12735 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/testresample.c')
| -rw-r--r-- | apps/codecs/libspeex/testresample.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/libspeex/testresample.c b/apps/codecs/libspeex/testresample.c index c54b113..5e02479 100644 --- a/apps/codecs/libspeex/testresample.c +++ b/apps/codecs/libspeex/testresample.c @@ -48,8 +48,8 @@ int main(int argc, char **argv) short *out; float *fin, *fout; int count = 0; - SpeexResamplerState *st = speex_resampler_init(1, 8000, 12000, 8000, 12000, 5); - speex_resampler_set_rate(st, 16000, 8001, 8000, 15999); + SpeexResamplerState *st = speex_resampler_init(1, 8000, 12000, 10); + speex_resampler_set_rate(st, 8000, 15999); speex_resampler_skip_zeros(st); in = malloc(NN*sizeof(short)); @@ -67,9 +67,12 @@ int main(int argc, char **argv) fin[i]=in[i]; in_len = NN; out_len = 2*NN; + /*if (count==2) + speex_resampler_set_quality(st, 10);*/ speex_resampler_process_float(st, 0, fin, &in_len, fout, &out_len); for (i=0;i<out_len;i++) out[i]=floor(.5+fout[i]); + /*speex_warning_int("writing", out_len);*/ fwrite(out, sizeof(short), out_len, stdout); count++; } |