Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/libvorbis-devel-1.1.0/vorbisfile/ drwxr-xr-x |
Viewing file: Select action/file-type:
Example Code: seekingThe following is a run-through of the seeking example program supplied with vorbisfile - seeking_test.c. This program tests the vorbisfile ov_time_seek function by seeking to random points within the file.
First, relevant headers, including vorbis-specific "codec.h" and "vorbisfile.h" have to be included.
Inside main(), we declare our primary OggVorbis_File structure. We also declare other helpful variables to track our progress within the file.
ov_open() must be
called to initialize the OggVorbis_File structure with default values.
ov_open() also checks to ensure that we're reading Vorbis format and not something else.
First we check to make sure the stream is seekable using ov_seekable. Then we seek to 100 random spots in the bitstream using ov_time_seek with randomly generated values.
When we're done seeking, we need to call ov_clear() to release the bitstream.
The full source for seeking_test.c can be found with the vorbis
distribution in seeking_test.c.
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0034 ]-- |