1
0
Fork 0
forked from len0rd/rockbox

* 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
This commit is contained in:
Dan Everton 2007-03-12 11:54:07 +00:00
parent 19bba742e7
commit 879070f89e
21 changed files with 1302 additions and 561 deletions

View file

@ -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++;
}