4 <title>vorbisfile - seeking_test.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>seeking_test.c</h1>
19 The example program source:
22 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
29 #include "vorbis/codec.h"
30 #include "vorbis/vorbisfile.h"
31 #include "../lib/misc.h"
37 /* open the file/pipe on stdin */
38 if(ov_open(stdin,&ov,NULL,-1)==-1){
39 printf("Could not open input as an OggVorbis file.\n\n");
43 /* print details about each logical bitstream in the input */
45 double length=ov_time_total(&ov,-1);
46 printf("testing seeking to random places in %g seconds....\n",length);
48 double val=(double)rand()/RAND_MAX*length;
49 ov_time_seek(&ov,val);
50 printf("\r\t%d [%gs]... ",i,val);
54 printf("\r \nOK.\n\n");
56 printf("Standard input was not seekable.\n");
71 <table border=0 width=100%>
73 <td><p class=tiny>copyright © 2003 Xiph.org</p></td>
74 <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>
76 <td><p class=tiny>Vorbisfile documentation</p></td>
77 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>