Commit effaee03 authored by Monty's avatar Monty

global replaced all tabs with whitespaces in the source to end some of

the ongoing formatting silliness.

...with apologies to the havoc this will wreak on svn blame being useful.


svn path=/trunk/vorbis/; revision=16037
parent 5f1308fd
......@@ -43,25 +43,25 @@ int main(){
/* print details about each logical bitstream in the input */
if(ov_seekable(&ov)){
printf("Input bitstream contained %ld logical bitstream section(s).\n",
ov_streams(&ov));
ov_streams(&ov));
printf("Total bitstream samples: %ld\n\n",
(long)ov_pcm_total(&ov,-1));
(long)ov_pcm_total(&ov,-1));
printf("Total bitstream playing time: %ld seconds\n\n",
(long)ov_time_total(&ov,-1));
(long)ov_time_total(&ov,-1));
}else{
printf("Standard input was not seekable.\n"
"First logical bitstream information:\n\n");
"First logical bitstream information:\n\n");
}
for(i=0;i<ov_streams(&ov);i++){
vorbis_info *vi=ov_info(&ov,i);
printf("\tlogical bitstream section %d information:\n",i+1);
printf("\t\t%ldHz %d channels bitrate %ldkbps serial number=%ld\n",
vi->rate,vi->channels,ov_bitrate(&ov,i)/1000,
ov_serialnumber(&ov,i));
vi->rate,vi->channels,ov_bitrate(&ov,i)/1000,
ov_serialnumber(&ov,i));
printf("\t\theader length: %ld bytes\n",(long)
(ov.dataoffsets[i]-ov.offsets[i]));
(ov.dataoffsets[i]-ov.offsets[i]));
printf("\t\tcompressed length: %ld bytes\n",(long)(ov_raw_total(&ov,i)));
printf("\t\tplay time: %lds\n",(long)ov_time_total(&ov,i));
}
......
This diff is collapsed.
......@@ -41,12 +41,12 @@ signed char readbuffer[READ*4+44]; /* out of the data segment, not the stack */
int main(){
ogg_stream_state os; /* take physical pages, weld into a logical
stream of packets */
stream of packets */
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
ogg_packet op; /* one raw packet of data for decode */
vorbis_info vi; /* struct that stores all the static vorbis bitstream
settings */
settings */
vorbis_comment vc; /* struct that stores all the user comments */
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
......@@ -84,17 +84,16 @@ int main(){
for (i=0, founddata=0; i<30 && ! feof(stdin) && ! ferror(stdin); i++)
{
fread(readbuffer,1,2,stdin);
if ( ! strncmp((char*)readbuffer, "da", 2) )
{
if ( ! strncmp((char*)readbuffer, "da", 2) ){
founddata = 1;
fread(readbuffer,1,6,stdin);
break;
}
}
/********** Encode setup ************/
vorbis_info_init(&vi);
/* choose an encoding mode. A few possibilities commented out, one
......@@ -162,20 +161,20 @@ int main(){
vorbis_analysis_headerout(&vd,&vc,&header,&header_comm,&header_code);
ogg_stream_packetin(&os,&header); /* automatically placed in its own
page */
page */
ogg_stream_packetin(&os,&header_comm);
ogg_stream_packetin(&os,&header_code);
/* This ensures the actual
* audio data will start on a new page, as per spec
*/
while(!eos){
int result=ogg_stream_flush(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,stdout);
fwrite(og.body,1,og.body_len,stdout);
}
/* This ensures the actual
* audio data will start on a new page, as per spec
*/
while(!eos){
int result=ogg_stream_flush(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,stdout);
fwrite(og.body,1,og.body_len,stdout);
}
}
while(!eos){
......@@ -188,7 +187,7 @@ int main(){
Tell the library we're at end of stream so that it can handle
the last frame and mark end of stream in the output properly */
vorbis_analysis_wrote(&vd,0);
}else{
/* data to encode */
......@@ -197,10 +196,10 @@ int main(){
/* uninterleave samples */
for(i=0;i<bytes/4;i++){
buffer[0][i]=((readbuffer[i*4+1]<<8)|
(0x00ff&(int)readbuffer[i*4]))/32768.f;
buffer[1][i]=((readbuffer[i*4+3]<<8)|
(0x00ff&(int)readbuffer[i*4+2]))/32768.f;
buffer[0][i]=((readbuffer[i*4+1]<<8)|
(0x00ff&(int)readbuffer[i*4]))/32768.f;
buffer[1][i]=((readbuffer[i*4+3]<<8)|
(0x00ff&(int)readbuffer[i*4+2]))/32768.f;
}
/* tell the library how much we actually submitted */
......@@ -217,22 +216,22 @@ int main(){
vorbis_bitrate_addblock(&vb);
while(vorbis_bitrate_flushpacket(&vd,&op)){
/* weld the packet into the bitstream */
ogg_stream_packetin(&os,&op);
/* write out pages (if any) */
while(!eos){
int result=ogg_stream_pageout(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,stdout);
fwrite(og.body,1,og.body_len,stdout);
/* this could be set above, but for illustrative purposes, I do
it here (to show that vorbis does know where the stream ends) */
if(ogg_page_eos(&og))eos=1;
}
/* weld the packet into the bitstream */
ogg_stream_packetin(&os,&op);
/* write out pages (if any) */
while(!eos){
int result=ogg_stream_pageout(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,stdout);
fwrite(og.body,1,og.body_len,stdout);
/* this could be set above, but for illustrative purposes, I do
it here (to show that vorbis does know where the stream ends) */
if(ogg_page_eos(&og))eos=1;
}
}
}
}
......
......@@ -26,9 +26,9 @@
#endif
void _verify(OggVorbis_File *ov,
ogg_int64_t val,ogg_int64_t pcmval,double timeval,
ogg_int64_t pcmlength,
char *bigassbuffer){
ogg_int64_t val,ogg_int64_t pcmval,double timeval,
ogg_int64_t pcmlength,
char *bigassbuffer){
int j;
long bread;
char buffer[4096];
......@@ -38,17 +38,17 @@ void _verify(OggVorbis_File *ov,
/* verify the raw position, the pcm position and position decode */
if(val!=-1 && ov_raw_tell(ov)<val){
fprintf(stderr,"raw position out of tolerance: requested %ld, got %ld\n",
(long)val,(long)ov_raw_tell(ov));
(long)val,(long)ov_raw_tell(ov));
exit(1);
}
if(pcmval!=-1 && ov_pcm_tell(ov)>pcmval){
fprintf(stderr,"pcm position out of tolerance: requested %ld, got %ld\n",
(long)pcmval,(long)ov_pcm_tell(ov));
(long)pcmval,(long)ov_pcm_tell(ov));
exit(1);
}
if(timeval!=-1 && ov_time_tell(ov)>timeval){
fprintf(stderr,"time position out of tolerance: requested %f, got %f\n",
timeval,ov_time_tell(ov));
timeval,ov_time_tell(ov));
exit(1);
}
pos=ov_pcm_tell(ov);
......@@ -62,12 +62,12 @@ void _verify(OggVorbis_File *ov,
fprintf(stderr,"data position after seek doesn't match pcm position\n");
{
FILE *f=fopen("a.m","w");
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)buffer[j]);
fclose(f);
f=fopen("b.m","w");
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)bigassbuffer[j+pos*2]);
fclose(f);
FILE *f=fopen("a.m","w");
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)buffer[j]);
fclose(f);
f=fopen("b.m","w");
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)bigassbuffer[j+pos*2]);
fclose(f);
}
exit(1);
......@@ -102,9 +102,9 @@ int main(){
for(i=0;i<ov.links;i++){
vorbis_info *vi=ov_info(&ov,i);
if(vi->channels!=2){
fprintf(stderr,"Sorry; right now seeking_test can only use Vorbis files\n"
"that are entirely stereo.\n\n");
exit(1);
fprintf(stderr,"Sorry; right now seeking_test can only use Vorbis files\n"
"that are entirely stereo.\n\n");
exit(1);
}
}
......@@ -118,29 +118,29 @@ int main(){
int ret=ov_read(&ov,bigassbuffer+i,pcmlength*2-i,1,1,1,&dummy);
if(ret<0)continue;
if(ret){
i+=ret;
i+=ret;
}else{
pcmlength=i/2;
pcmlength=i/2;
}
fprintf(stderr,"\rloading.... [%ld left] ",
(long)(pcmlength*2-i));
(long)(pcmlength*2-i));
}
{
ogg_int64_t length=ov.end;
fprintf(stderr,"\rtesting raw seeking to random places in %ld bytes....\n",
(long)length);
(long)length);
for(i=0;i<1000;i++){
ogg_int64_t val=(double)rand()/RAND_MAX*length;
fprintf(stderr,"\r\t%d [raw position %ld]... ",i,(long)val);
ret=ov_raw_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
ogg_int64_t val=(double)rand()/RAND_MAX*length;
fprintf(stderr,"\r\t%d [raw position %ld]... ",i,(long)val);
ret=ov_raw_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
_verify(&ov,val,-1,-1.,pcmlength,bigassbuffer);
_verify(&ov,val,-1,-1.,pcmlength,bigassbuffer);
}
}
......@@ -148,18 +148,18 @@ int main(){
fprintf(stderr,"\r");
{
fprintf(stderr,"testing pcm page seeking to random places in %ld samples....\n",
(long)pcmlength);
(long)pcmlength);
for(i=0;i<1000;i++){
ogg_int64_t val=(double)rand()/RAND_MAX*pcmlength;
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val);
ret=ov_pcm_seek_page(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
ogg_int64_t val=(double)rand()/RAND_MAX*pcmlength;
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val);
ret=ov_pcm_seek_page(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer);
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer);
}
}
......@@ -167,23 +167,23 @@ int main(){
fprintf(stderr,"\r");
{
fprintf(stderr,"testing pcm exact seeking to random places in %ld samples....\n",
(long)pcmlength);
(long)pcmlength);
for(i=0;i<1000;i++){
ogg_int64_t val=(double)rand()/RAND_MAX*pcmlength;
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val);
ret=ov_pcm_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
if(ov_pcm_tell(&ov)!=val){
fprintf(stderr,"Declared position didn't perfectly match request: %ld != %ld\n",
(long)val,(long)ov_pcm_tell(&ov));
exit(1);
}
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer);
ogg_int64_t val=(double)rand()/RAND_MAX*pcmlength;
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val);
ret=ov_pcm_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
if(ov_pcm_tell(&ov)!=val){
fprintf(stderr,"Declared position didn't perfectly match request: %ld != %ld\n",
(long)val,(long)ov_pcm_tell(&ov));
exit(1);
}
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer);
}
}
......@@ -191,18 +191,18 @@ int main(){
fprintf(stderr,"\r");
{
fprintf(stderr,"testing time page seeking to random places in %f seconds....\n",
timelength);
timelength);
for(i=0;i<1000;i++){
double val=(double)rand()/RAND_MAX*timelength;
fprintf(stderr,"\r\t%d [time position %f]... ",i,val);
ret=ov_time_seek_page(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
double val=(double)rand()/RAND_MAX*timelength;
fprintf(stderr,"\r\t%d [time position %f]... ",i,val);
ret=ov_time_seek_page(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer);
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer);
}
}
......@@ -210,23 +210,23 @@ int main(){
fprintf(stderr,"\r");
{
fprintf(stderr,"testing time exact seeking to random places in %f seconds....\n",
timelength);
timelength);
for(i=0;i<1000;i++){
double val=(double)rand()/RAND_MAX*timelength;
fprintf(stderr,"\r\t%d [time position %f]... ",i,val);
ret=ov_time_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
if(ov_time_tell(&ov)<val-1 || ov_time_tell(&ov)>val+1){
fprintf(stderr,"Declared position didn't perfectly match request: %f != %f\n",
val,ov_time_tell(&ov));
exit(1);
}
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer);
double val=(double)rand()/RAND_MAX*timelength;
fprintf(stderr,"\r\t%d [time position %f]... ",i,val);
ret=ov_time_seek(&ov,val);
if(ret<0){
fprintf(stderr,"seek failed: %d\n",ret);
exit(1);
}
if(ov_time_tell(&ov)<val-1 || ov_time_tell(&ov)>val+1){
fprintf(stderr,"Declared position didn't perfectly match request: %f != %f\n",
val,ov_time_tell(&ov));
exit(1);
}
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer);
}
}
......
......@@ -60,7 +60,7 @@ int main(){
}
fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
fprintf(stderr,"\nDecoded length: %ld samples\n",
(long)ov_pcm_total(&vf,-1));
(long)ov_pcm_total(&vf,-1));
fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
}
......@@ -71,10 +71,10 @@ int main(){
eof=1;
} else if (ret < 0) {
/* error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
case we (the app) cares. In this case, we don't. */
} else {
/* we don't bother dealing with sample rate changes, etc, but
you'll have to*/
you'll have to*/
fwrite(pcmout,1,ret,stdout);
}
}
......
......@@ -168,7 +168,7 @@ extern int vorbis_info_blocksize(vorbis_info *vi,int zo);
extern void vorbis_comment_init(vorbis_comment *vc);
extern void vorbis_comment_add(vorbis_comment *vc, const char *comment);
extern void vorbis_comment_add_tag(vorbis_comment *vc,
const char *tag, const char *contents);
const char *tag, const char *contents);
extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count);
extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag);
extern void vorbis_comment_clear(vorbis_comment *vc);
......@@ -177,7 +177,7 @@ extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
extern int vorbis_block_clear(vorbis_block *vb);
extern void vorbis_dsp_clear(vorbis_dsp_state *v);
extern double vorbis_granule_time(vorbis_dsp_state *v,
ogg_int64_t granulepos);
ogg_int64_t granulepos);
extern const char *vorbis_version_string(void);
......@@ -186,10 +186,10 @@ extern const char *vorbis_version_string(void);
extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
extern int vorbis_analysis_headerout(vorbis_dsp_state *v,
vorbis_comment *vc,
ogg_packet *op,
ogg_packet *op_comm,
ogg_packet *op_code);
vorbis_comment *vc,
ogg_packet *op,
ogg_packet *op_comm,
ogg_packet *op_code);
extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
......@@ -197,12 +197,12 @@ extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op);
extern int vorbis_bitrate_addblock(vorbis_block *vb);
extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
ogg_packet *op);
ogg_packet *op);
/* Vorbis PRIMITIVES: synthesis layer *******************************/
extern int vorbis_synthesis_idheader(ogg_packet *op);
extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
ogg_packet *op);
ogg_packet *op);
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
......
......@@ -26,34 +26,34 @@ extern "C"
#include "codec.h"
extern int vorbis_encode_init(vorbis_info *vi,
long channels,
long rate,
long channels,
long rate,
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
extern int vorbis_encode_setup_managed(vorbis_info *vi,
long channels,
long rate,
long channels,
long rate,
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
extern int vorbis_encode_setup_vbr(vorbis_info *vi,
long channels,
long rate,
long channels,
long rate,
float quality /* quality level from 0. (lo) to 1. (hi) */
);
float quality /* quality level from 0. (lo) to 1. (hi) */
);
extern int vorbis_encode_init_vbr(vorbis_info *vi,
long channels,
long rate,
long channels,
long rate,
float base_quality /* quality level from 0. (lo) to 1. (hi) */
);
float base_quality /* quality level from 0. (lo) to 1. (hi) */
);
extern int vorbis_encode_setup_init(vorbis_info *vi);
......
......@@ -122,8 +122,8 @@ typedef struct OggVorbis_File {
ogg_int64_t *dataoffsets;
long *serialnos;
ogg_int64_t *pcmlengths; /* overloaded to maintain binary
compatability; x2 size, stores both
beginning and end values */
compatability; x2 size, stores both
beginning and end values */
vorbis_info *vi;
vorbis_comment *vc;
......@@ -150,11 +150,11 @@ extern int ov_clear(OggVorbis_File *vf);
extern int ov_fopen(char *path,OggVorbis_File *vf);
extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
char *initial, long ibytes, ov_callbacks callbacks);
char *initial, long ibytes, ov_callbacks callbacks);
extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
char *initial, long ibytes, ov_callbacks callbacks);
char *initial, long ibytes, ov_callbacks callbacks);
extern int ov_test_open(OggVorbis_File *vf);
extern long ov_bitrate(OggVorbis_File *vf,int i);
......@@ -187,12 +187,12 @@ extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
int *bitstream);
int *bitstream);
extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length,
int bigendianp,int word,int sgned,int *bitstream,
void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param);
int bigendianp,int word,int sgned,int *bitstream,
void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param);
extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
int bigendianp,int word,int sgned,int *bitstream);
int bigendianp,int word,int sgned,int *bitstream);
extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2);
extern int ov_halfrate(OggVorbis_File *vf,int flag);
......
......@@ -80,23 +80,23 @@ void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg
for(j=0;j<n;j++){
if(bark){
float b=toBARK((4000.f*j/n)+.25);
fprintf(of,"%f ",b);
float b=toBARK((4000.f*j/n)+.25);
fprintf(of,"%f ",b);
}else
if(off!=0)
fprintf(of,"%f ",(double)(j+off)/8000.);
else
fprintf(of,"%f ",(double)j);
if(off!=0)
fprintf(of,"%f ",(double)(j+off)/8000.);
else
fprintf(of,"%f ",(double)j);
if(dB){
float val;
if(v[j]==0.)
val=-140.;
else
val=todB(v+j);
fprintf(of,"%f\n",val);
float val;
if(v[j]==0.)
val=-140.;
else
val=todB(v+j);
fprintf(of,"%f\n",val);
}else{
fprintf(of,"%f\n",v[j]);
fprintf(of,"%f\n",v[j]);
}
}
fclose(of);
......@@ -105,7 +105,7 @@ void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg
}
void _analysis_output(char *base,int i,float *v,int n,int bark,int dB,
ogg_int64_t off){
ogg_int64_t off){
if(analysis_noisy)_analysis_output_always(base,i,v,n,bark,dB,off);
}
......
......@@ -35,7 +35,7 @@ typedef struct{
void (*free_look) (vorbis_look_floor *);
void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *);
int (*inverse2) (struct vorbis_block *,vorbis_look_floor *,
void *buffer,float *);
void *buffer,float *);
} vorbis_func_floor;
typedef struct{
......@@ -89,16 +89,16 @@ typedef struct{
void (*pack) (vorbis_info_residue *,oggpack_buffer *);
vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *);
vorbis_look_residue *(*look) (vorbis_dsp_state *,
vorbis_info_residue *);
vorbis_info_residue *);
void (*free_info) (vorbis_info_residue *);
void (*free_look) (vorbis_look_residue *);
long **(*class) (struct vorbis_block *,vorbis_look_residue *,
float **,int *,int);
float **,int *,int);
int (*forward) (oggpack_buffer *,struct vorbis_block *,
vorbis_look_residue *,
float **,float **,int *,int,long **);
vorbis_look_residue *,
float **,float **,int *,int,long **);
int (*inverse) (struct vorbis_block *,vorbis_look_residue *,
float **,int *,int);
float **,int *,int);
} vorbis_func_residue;
typedef struct vorbis_info_residue0{
......@@ -120,7 +120,7 @@ typedef struct vorbis_info_residue0{
/* Mapping backend generic *****************************************/
typedef struct{
void (*pack) (vorbis_info *,vorbis_info_mapping *,
oggpack_buffer *);
oggpack_buffer *);
vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
void (*free_info) (vorbis_info_mapping *);
int (*forward) (struct vorbis_block *vb);
......
......@@ -23,31 +23,31 @@ int main(){
for(i=64;i<32000;i*=2){
rate=48000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
rate=44100.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));
rate=32000.f;
fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n",
rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2));