4 <title>vorbisfile - chaining_example.c</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>Vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
16 <h1>chaining_example.c</h1>
19 The example program source:
22 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
27 #include <vorbis/codec.h>
28 #include <vorbis/vorbisfile.h>
34 /* open the file/pipe on stdin */
35 if(ov_open(stdin,&ov,NULL,-1)<0){
36 printf("Could not open input as an OggVorbis file.\n\n");
40 /* print details about each logical bitstream in the input */
42 printf("Input bitstream contained %ld logical bitstream section(s).\n",
44 printf("Total bitstream playing time: %ld seconds\n\n",
45 (long)ov_time_total(&ov,-1));
48 printf("Standard input was not seekable.\n"
49 "First logical bitstream information:\n\n");
52 for(i=0;i<ov_streams(&ov);i++){
53 vorbis_info *vi=ov_info(&ov,i);
54 printf("\tlogical bitstream section %d information:\n",i+1);
55 printf("\t\t%ldHz %d channels bitrate %ldkbps serial number=%ld\n",
56 vi->rate,vi->channels,ov_bitrate(&ov,i)/1000,
57 ov_serialnumber(&ov,i));
58 printf("\t\tcompressed length: %ld bytes ",(long)(ov_raw_total(&ov,i)));
59 printf(" play time: %lds\n",(long)ov_time_total(&ov,i));
74 <table border=0 width=100%>
76 <td><p class=tiny>copyright © 2003 Xiph.org</p></td>
77 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
79 <td><p class=tiny>Vorbisfile documentation</p></td>
80 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>