vorbisfile documentation

vorbisfile version 1.25 - 20000615

chaining_example.c

The example program source:



#include 

#include 



int main(){

  OggVorbis_File ov;

  int i;



  /* open the file/pipe on stdin */

  if(ov_open(stdin,&ov,NULL,-1)<0){

    printf("Could not open input as an OggVorbis file.\n\n");

    exit(1);

  }

  

  /* 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));

    printf("Total bitstream playing time: %ld seconds\n\n",

	   (long)ov_time_total(&ov,-1));



  }else{

    printf("Standard input was not seekable.\n"

	   "First logical bitstream information:\n\n");

  }



  for(i=0;irate,vi->channels,ov_bitrate(&ov,i)/1000,

	   ov_serialnumber(&ov,i));

    printf("\t\tcompressed length: %ld bytes ",(long)(ov_raw_total(&ov,i)));

    printf(" play time: %lds\n",(long)ov_time_total(&ov,i));

  }



  ov_clear(&ov);

  return 0;

}





copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

vorbisfile documentation

vorbisfile version 1.25 - 20000615