From 74f4b1bc3b627ba4c7e03498234d88cacdfbe97b Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 29 Sep 2021 22:52:49 +0200 Subject: Squashed 'vorbis/' content from commit d22c3ab5f git-subtree-dir: vorbis git-subtree-split: d22c3ab5f633460abc2532feee60ca0892134cbf --- doc/vorbisfile/ov_fopen.html | 124 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 doc/vorbisfile/ov_fopen.html (limited to 'doc/vorbisfile/ov_fopen.html') diff --git a/doc/vorbisfile/ov_fopen.html b/doc/vorbisfile/ov_fopen.html new file mode 100644 index 0000000..9a7b14b --- /dev/null +++ b/doc/vorbisfile/ov_fopen.html @@ -0,0 +1,124 @@ + + + +Vorbisfile - function - ov_fopen + + + + + + + + + +

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

+ +

ov_fopen

+ +

declared in "vorbis/vorbisfile.h";

+ +

This is the simplest function used to open and initialize an OggVorbis_File +structure. It sets up all the related decoding structure. +

The first argument is a file path suitable +for passing to fopen(). vf should be a pointer to an empty +OggVorbis_File structure -- this is used for ALL the externally visible +libvorbisfile functions. Once this has been called, the same OggVorbis_File struct should be passed +to all the libvorbisfile functions. +

The vf structure initialized using ov_fopen() must +eventually be cleaned using ov_clear(). + +

+It is often useful to call ov_fopen() simply to determine +whether a given file is a Vorbis bitstream. If the ov_fopen() +call fails, then the file is either inaccessable (errno is set) or not +recognizable as Vorbis (errno unchanged). If the call succeeds but +the initialized vf structure will not be used, the +application is responsible for calling ov_clear() to clear the decoder's buffers and +close the file.

+ +

+ + + + +
+

+int ov_fopen(const char *path,OggVorbis_File *vf);
+
+
+ +

Parameters

+
+
path
+
Null terminated string containing a file path suitable for passing to fopen(). +
+
vf
+
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions. Once this has been called, the same OggVorbis_File +struct should be passed to all the libvorbisfile functions.
+
+ + +

Return Values

+
+
  • 0 indicates success
  • + +
  • less than zero for failure:
  • + +
    +

    + +

    Notes

    +
    + +
    [a] Threaded decode

    +

    If your decoder is threaded, it is recommended that you NOT call +ov_open_callbacks() +in the main control thread--instead, call ov_open_callbacks() in your decode/playback +thread. This is important because ov_open_callbacks() may be a fairly time-consuming +call, given that the full structure of the file is determined at this point, +which may require reading large parts of the file under certain circumstances +(determining all the logical bitstreams in one physical bitstream, for +example). See Thread Safety for other information on using libvorbisfile with threads. +

    + +

    [b] Mixed media streams

    +

    +As of Vorbisfile release 1.2.0, Vorbisfile is able to access the +Vorbis content in mixed-media Ogg streams, not just Vorbis-only +streams. For example, Vorbisfile may be used to open and access the +audio from an Ogg stream consisting of Theora video and Vorbis audio. +Vorbisfile 1.2.0 decodes the first logical audio stream of each +physical stream section.

    + +

    [c] Faster testing for Vorbis files

    +

    ov_test() and ov_test_callbacks() provide less +computationally expensive ways to test a file for Vorbisness, but +require more setup code.

    + +

    + +

    +
    + + + + + + + + +

    copyright © 2000-2010 Xiph.Org

    Ogg Vorbis

    Vorbisfile documentation

    vorbisfile version 1.3.2 - 20101101

    + + + + -- cgit v1.1