1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9 * by the Xiph.Org Foundation https://xiph.org/ *
11 ********************************************************************
13 function: bark scale utility
15 ********************************************************************/
22 for(i=64;i<32000;i*=2){
24 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
25 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
28 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
29 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
32 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
33 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
36 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
37 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
40 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
41 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
44 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
45 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
48 fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n\n",
49 rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
56 for(i=0.,j=0;i<28;i+=1,j++){
57 fprintf(stderr,"(%d) bark=%f %gHz (%d of 128)\n",
58 j,i,fromBARK(i),(int)(fromBARK(i)/22050.*128.));