#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
int main(){
OggVorbis_File ov;
int i;
#ifdef _WIN32 /* We need to set stdin to binary mode on windows. */
_setmode( _fileno( stdin ), _O_BINARY );
#endif
/* open the file/pipe on stdin */
if(ov_open_callbacks(stdin,&ov,NULL,-1,OV_CALLBACKS_NOCLOSE)<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;i<ov_streams(&ov);i++){
vorbis_info *vi=ov_info(&ov,i);
printf("\tlogical bitstream section %d information:\n",i 0000644 0000000 0000000 00000004236 11044155502 023432 0 ustar root root
Vorbisfile - function - ov_pcm_seek
Vorbisfile documentation
vorbisfile version 1.2.0 - 20070723
ov_pcm_seek
declared in "vorbis/vorbisfile.h";
Seeks to the offset specified (in pcm samples) within the physical bitstr