From 0dea514251507fa16f9d2c7d7780025bbf0c800a Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 2 Jul 2002 21:40:29 +0000 Subject: [PATCH] Numerous corrections and updates to libVorbisfile docs svn path=/trunk/vorbis/; revision=3495 --- doc/vorbisfile/OggVorbis_File.html | 78 ++++++++++++++++++++-------------- doc/vorbisfile/datastructures.html | 22 +++++----- doc/vorbisfile/decoding.html | 52 ++++++++++++++++++----- doc/vorbisfile/example.html | 26 ++++++------ doc/vorbisfile/fileinfo.html | 21 +++++---- doc/vorbisfile/index.html | 37 +++++++++------- doc/vorbisfile/initialization.html | 71 ++++++++++++++++++++++--------- doc/vorbisfile/ov_bitrate.html | 21 +++++---- doc/vorbisfile/ov_bitrate_instant.html | 24 +++++------ doc/vorbisfile/ov_callbacks.html | 50 +++++++++++----------- doc/vorbisfile/ov_clear.html | 27 ++++++------ doc/vorbisfile/ov_comment.html | 19 +++++---- doc/vorbisfile/ov_info.html | 21 +++++---- doc/vorbisfile/ov_open.html | 37 ++++++++-------- doc/vorbisfile/ov_open_callbacks.html | 30 +++++++------ doc/vorbisfile/ov_pcm_seek.html | 25 ++++++----- doc/vorbisfile/ov_pcm_seek_page.html | 22 +++++----- doc/vorbisfile/ov_pcm_tell.html | 22 +++++----- doc/vorbisfile/ov_pcm_total.html | 21 ++++----- doc/vorbisfile/ov_raw_seek.html | 28 ++++++------ doc/vorbisfile/ov_raw_tell.html | 22 +++++----- doc/vorbisfile/ov_raw_total.html | 28 ++++++------ doc/vorbisfile/ov_read.html | 66 +++++++++++++++------------- doc/vorbisfile/ov_read_float.html | 13 +++--- doc/vorbisfile/ov_seekable.html | 26 ++++++------ doc/vorbisfile/ov_serialnumber.html | 26 ++++++------ doc/vorbisfile/ov_streams.html | 21 +++++---- doc/vorbisfile/ov_test.html | 24 +++++------ doc/vorbisfile/ov_test_callbacks.html | 30 +++++++------ doc/vorbisfile/ov_test_open.html | 27 +++++++----- doc/vorbisfile/ov_time_seek.html | 21 +++++---- doc/vorbisfile/ov_time_seek_page.html | 23 +++++----- doc/vorbisfile/ov_time_tell.html | 26 ++++++------ doc/vorbisfile/ov_time_total.html | 33 ++++++-------- doc/vorbisfile/overview.html | 36 +++++++++++----- doc/vorbisfile/reference.html | 19 ++++++--- doc/vorbisfile/seeking.html | 41 ++++++++++-------- doc/vorbisfile/vorbis_comment.html | 23 +++++----- doc/vorbisfile/vorbis_info.html | 52 +++++++---------------- 39 files changed, 660 insertions(+), 551 deletions(-) diff --git a/doc/vorbisfile/OggVorbis_File.html b/doc/vorbisfile/OggVorbis_File.html index a00e26b..05548c8 100644 --- a/doc/vorbisfile/OggVorbis_File.html +++ b/doc/vorbisfile/OggVorbis_File.html @@ -1,15 +1,15 @@ -vorbisfile - datatype - OggVorbis_File +Vorbisfile - datatype - OggVorbis_File - - + +

vorbisfile documentation

vorbisfile - 20011218

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

@@ -20,10 +20,30 @@

The OggVorbis_File structure defines an Ogg Vorbis file.

-This structure is used in all vorbisfile routines. Before it can be used, it must be initialized by ov_open or ov_open_callbacks. + +This structure is used in all libvorbisfile routines. Before it can be used, +it must be initialized by ov_open() or ov_open_callbacks(). + +

+After use, the OggVorbis_File structure must be deallocated with a +call to ov_clear(). + +

+Once a file or data source is opened successfully by libvorbisfile +(using ov_open() or ov_open_callbacks()), it is owned by +libvorbisfile. The file should not be used by any other applications or +functions outside of the libvorbisfile API. The file must not be closed +directly by the application at any time after a successful open; +libvorbisfile expects to close the file within ov_clear().

-After use, the OggVorbis_File structure must be deallocated with a call to ov_clear(). -

Once a file or data source is passed to libvorbisfile, it is owned by vorbisfile. The file should not be used by any other applications or functions outside the Vorbisfile API. +If the call to ov_open() or ov_open_callbacks() fails, +libvorbisfile does not assume ownership of the file and the +application is expected to close it if necessary. +

@@ -31,28 +51,28 @@ After use, the OggVorbis_File structure must be deallocated with a call to typedef struct { void *datasource; /* Pointer to a FILE *, etc. */ int seekable; - int64_t offset; - int64_t end; + ogg_int64_t offset; + ogg_int64_t end; ogg_sync_state oy; /* If the FILE handle isn't seekable (eg, a pipe), only the current stream appears */ int links; - int64_t *offsets; - int64_t *dataoffsets; + ogg_int64_t *offsets; + ogg_int64_t *dataoffsets; long *serialnos; - int64_t *pcmlengths; + ogg_int64_t *pcmlengths; vorbis_info *vi; vorbis_comment *vc; /* Decoding working state local storage */ - int64_t pcm_offset; + ogg_int64_t pcm_offset; int ready_state; long current_serialno; int current_link; - double bittrack; - double samptrack; + ogg_int64_t bittrack; + ogg_int64_t samptrack; ogg_stream_state os; /* take physical pages, weld into a logical stream of packets */ @@ -69,34 +89,30 @@ After use, the OggVorbis_File structure must be deallocated with a call to Relevant Struct Members
datasource
-
Pointer to file or other ogg source.
+ +
Pointer to file or other ogg source. When using stdio based +file/stream access, this field contains a FILE pointer. When using +custom IO via callbacks, libvorbisfile treats this void pointer as a +black box only to be passed to the callback routines provided by the +application.
+
seekable
-
Read-only int indicating whether file is seekable, i.e., physical file is seekable, a pipe isn't.
+
Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.
links
Read-only int indicating the number of logical bitstreams within the physical bitstream.
ov_callbacks
-
Collection of file manipulation routines to be used on this data source.
+
Collection of file manipulation routines to be used on this data source. When using stdio/FILE access via ov_open(), the callbacks will be filled in with stdio calls or wrappers to stdio calls.
-

Notes

- -

If your system's <sys/types.h> does not -define int64_t, you will need to define this as a 64-bit type -inside your system's project file/Makefile, etc. On win32, for example, -this should be defined as __int64. On the Unix platform, these -are usually defined properly in the system header files. -

- -


- - + + - - + +

copyright © 2001 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile - 20011218

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

diff --git a/doc/vorbisfile/datastructures.html b/doc/vorbisfile/datastructures.html index 7a53003..72d7cf3 100644 --- a/doc/vorbisfile/datastructures.html +++ b/doc/vorbisfile/datastructures.html @@ -1,24 +1,22 @@ -vorbisfile - Base Data Structures +Vorbisfile - Base Data Structures - - + +

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

Base Data Structures

-

There are several data structures used to hold file and bitstream information during vorbisfile decoding. +

There are several data structures used to hold file and bitstream information during libvorbisfile decoding. These structures are declared in "vorbis/vorbisfile.h" and "vorbis/codec.h".

-All the vorbisfile specific data structures are declared in "vorbis/vorbisfile.h" or "vorbis/codec.h". -

-

When using vorbisfile, we usually won't need to know about most of the contents of these data structures, but it may be helpful to understand what they contain. +

When using libvorbisfile, it's not necessary to know about most of the contents of these data structures, but it may be helpful to understand what they contain.

@@ -42,7 +40,7 @@ All the vorbisfile specific data structures are declared in "vorbis/vorbi - +
ov_callbacksThis structure contains pointers to file manipulation routines. Can be user-specified for use with ov_open_callbacks().This structure contains pointers to the application-specified file manipulation routines set for use by ov_open_callbacks(). See also the provided document on using application-provided callbacks instead of stdio.
@@ -50,11 +48,11 @@ All the vorbisfile specific data structures are declared in "vorbis/vorbi


- - + + - - + +

copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

diff --git a/doc/vorbisfile/decoding.html b/doc/vorbisfile/decoding.html index afb25c8..e7151db 100644 --- a/doc/vorbisfile/decoding.html +++ b/doc/vorbisfile/decoding.html @@ -1,24 +1,57 @@ -vorbisfile - Decoding +Vorbisfile - Decoding - - + +

vorbisfile documentation

vorbisfile - 20011218

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

Decoding

-All the vorbisfile decoding routines are declared in "vorbis/vorbisfile.h". +All libvorbisfile decoding routines are declared in "vorbis/vorbisfile.h".

+After initialization, decoding audio +is as simple as calling ov_read(). This +function works similarly to reading from a normal file using +read().

+ +However, a few differences are worth noting: + +

multiple stream links

+ +A Vorbis stream may consist of multiple sections (called links) that +encode differing numbers of channels or sample rates. It is vitally +important to pay attention to the link numbers returned by ov_read and handle audio changes that may +occur at link boundaries. Such multi-section files do exist in the +wild and are not merely a specification curiosity. + +

returned data amount

+ +ov_read does not attempt to completely fill +a large, passed in data buffer; it merely guarantees that the passed +back data does not overflow the passed in buffer size. Large buffers +may be filled by iteratively looping over calls to ov_read (incrementing the buffer pointer) +until the original buffer is filled. + +

file cursor position

+ +Vorbis files do not necessarily start at a sample number or time offset +of zero. Do not be surprised if a file begins at a positive offset of +several minutes or hours, such as would happen if a large stream (such +as a concert recording) is chopped into multiple seperate files. + +

@@ -31,7 +64,7 @@ OggVorbis_File structure, which must have been initialized by a previous call to ov_open(). - +
function
ov_readov_read_float This function decodes to floats instead of integer samples.
@@ -40,15 +73,14 @@ call to ov_open().


- - + + - - + +

copyright © 2001 Xiphophorus

www.vorbis.org
team@icecast.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile - 20011218

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

- diff --git a/doc/vorbisfile/example.html b/doc/vorbisfile/example.html index 2a5cfaf..12977f1 100644 --- a/doc/vorbisfile/example.html +++ b/doc/vorbisfile/example.html @@ -1,15 +1,15 @@ -vorbisfile - Example Code +Vorbisfile - Example Code - - + +

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

@@ -17,11 +17,11 @@

The following is a run-through of the decoding example program supplied -with vorbisfile - vorbisfile_example.c. +with libvorbisfile, vorbisfile_example.c. This program takes a vorbis bitstream from stdin and writes raw pcm to stdout.

-First, relevant headers, including vorbis-specific "codec.h" and "vorbisfile.h" have to be included. +First, relevant headers, including vorbis-specific "vorbis/codec.h" and "vorbisfile.h" have to be included.

@@ -32,7 +32,7 @@ First, relevant headers, including vorbis-specific "codec.h" and "vorbisfile.h" #include <stdlib.h> #include <math.h> #include "vorbis/codec.h" -#include "vorbis/vorbisfile.h" +#include "vorbisfile.h" @@ -123,6 +123,8 @@ We also want to pull out and show the user a comment attached to the file using ++ptr; } fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate); + fprintf(stderr,"\nDecoded length: %ld samples\n", + (long)ov_pcm_total(&vf,-1)); fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor); } @@ -141,7 +143,7 @@ Here's the read loop:

 
   while(!eof){
-    long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,¤t_section);
+    long ret=ov_read(&vf,pcmout,sizeof(pcmout),¤t_section);
     if (ret == 0) {
       /* EOF */
       eof=1;
@@ -185,18 +187,16 @@ Now that we've finished playing, we can pack up and go home.  It's important to
 

-The full source for vorbisfile_example.c can be found with the vorbis -distribution in vorbisfile_example.c.


- - + + - - + +

copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

diff --git a/doc/vorbisfile/fileinfo.html b/doc/vorbisfile/fileinfo.html index 27f6370..db9bdbe 100644 --- a/doc/vorbisfile/fileinfo.html +++ b/doc/vorbisfile/fileinfo.html @@ -1,22 +1,22 @@ -vorbisfile - File Information +Vorbisfile - File Information - - + +

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

File Information

-

Vorbisfile contains many functions to get information about bitstream attributes and decoding status. +

Libvorbisfile contains many functions to get information about bitstream attributes and decoding status.

-All the vorbisfile file information routines are declared in "vorbis/vorbisfile.h". +All libvorbisfile file information routines are declared in "vorbis/vorbisfile.h".

@@ -30,7 +30,7 @@ All the vorbisfile file information routines are declared in "vorbis/vorb - + @@ -82,15 +82,14 @@ All the vorbisfile file information routines are declared in "vorbis/vorb
ov_bitrate_instantReturns the exact bitrate since the last call of this function, or -1 if beginning of the bitream or no new info is available.Returns the exact bitrate since the last call of this function, or -1 if at the beginning of the bitream or no new information is available.
ov_streams
- - + + - - + +

copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

- diff --git a/doc/vorbisfile/index.html b/doc/vorbisfile/index.html index 102636a..87addd5 100644 --- a/doc/vorbisfile/index.html +++ b/doc/vorbisfile/index.html @@ -1,39 +1,46 @@ -vorbisfile - Documentation +Vorbisfile - Documentation - - + +

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

-

VorbisFile Documentation

+

Vorbisfile Documentation

-VorbisFile is a stdio-based convenience library for decoding vorbis bitstreams. -It is the simplest and quickest way to go from file to raw PCM audio samples--if -your decoder doesn't need to read from anything other than a file, use -this. This document explains how to use the vorbisfile API in detail. + +The Vorbisfile library provides a convenient high-level API for +decoding and basic manipulation of all Vorbis I audio streams. +Libvorbisfile is implemented as a layer on top of Xiph.org's reference +libogg and libvorbis libraries.

+ +Vorbisfile can be used along with any ANSI compliant stdio implementation +for file/stream access, or use custom stream i/o routines provided by +the embedded environment. Both uses are described in detail in this +documentation. +

-vorbisfile api overview
-vorbisfile example code
-vorbisfile api reference
+API overview
+API reference
+Example code



- - + + - - + +

copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

diff --git a/doc/vorbisfile/initialization.html b/doc/vorbisfile/initialization.html index fd0c5cc..aa226f1 100644 --- a/doc/vorbisfile/initialization.html +++ b/doc/vorbisfile/initialization.html @@ -1,22 +1,34 @@ -libvorbisfile - Setup/Teardown +Vorbisfile - Setup/Teardown - - + +

libvorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

-

Setup/Teardown

-

In order to decode audio using libvorbisfile, a bitstream containing vorbis audio must be properly initialized and cleared when decoding is finished. +

Setup/Teardown

In order to decode audio using +libvorbisfile, a bitstream containing Vorbis audio must be properly +initialized before decoding and cleared when decoding is finished. +The simplest possible case is to use fopen() to open a Vorbis +file and then pass the FILE * to an ov_open() call. A successful return code from ov_open() indicates the file is ready for use. +Once the file is no longer needed, ov_clear() is used to close the file and +deallocate decoding resources. Do not call fclose() on the +file; libvorbisfile does this in the ov_clear() call. +

-All the vorbisfile initialization and deallocation routines are declared in "vorbis/vorbisfile.h". +All libvorbisfile initialization and deallocation routines are declared in "vorbis/vorbisfile.h".

@@ -31,23 +43,44 @@ All the vorbisfile initialization and deallocation routines are declared - - - - - + + - - + + + + - + + +Finish opening a file after a successful call to ov_test() or ov_test_callbacks(). + + +
ov_open_callbacksInitializes the Ogg Vorbis bitstream with a pointer to a bitstream, default values, and custom file/bitstream manipulation routines. Used instead of ov_open when working with a data source other than a file.
ov_clearCloses the bitstream and cleans up loose ends. Must be called when we're done with the bitstream.Initializes the Ogg Vorbis bitstream with a pointer to a bitstream, default values, and custom file/bitstream manipulation routines. Used instead of ov_open() when working with other than stdio based I/O.
ov_testPartially opens a vorbis file for testing.ov_testPartially opens a file just far enough to determine if the file +is an Ogg Vorbis file or not. A successful return indicates that the +file appears to be an Ogg Vorbis file, but the OggVorbis_File struct is not yet fully +initialized for actual decoding. After a successful return, the file +may be closed using ov_clear() or fully +opened for decoding using ov_test_open().

This call is intended to +be used as a less expensive file open test than a full ov_open().

+Note that libvorbisfile owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisfile.

ov_test_callbacksSame as above but useful for non-files like streams.As above but allowing application-define I/O callbacks.

+Note that libvorbisfile owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisfile.

ov_test_open -Finish open a file opened for testing.
ov_clear Closes the + bitstream and cleans up loose ends. Must be called when + finished with the bitstream. After return, the OggVorbis_File struct is + invalid and may not be used before being initialized again + before begin reinitialized. + +
@@ -55,11 +88,11 @@ All the vorbisfile initialization and deallocation routines are declared


- - + + - - + +

copyright © 2000 vorbis team

Ogg Vorbis
team@vorbis.org

copyright © 2002 Xiph.org

Ogg Vorbis

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

diff --git a/doc/vorbisfile/ov_bitrate.html b/doc/vorbisfile/ov_bitrate.html index 5c379cf..bcfd257 100644 --- a/doc/vorbisfile/ov_bitrate.html +++ b/doc/vorbisfile/ov_bitrate.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_bitrate +Vorbisfile - function - ov_bitrate - - + +

vorbisfile documentation

vorbisfile version 1.25 - 20000615

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

@@ -35,7 +35,7 @@ long ov_bitrate(OggVorbis_File *vf,int i);

Parameters

vf
-
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
i
Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the bitrate for the entire bitstream, this parameter should be set to -1.
@@ -44,7 +44,7 @@ functions.

Return Values

-
  • OV_EINVAL indicates that an invalid argument value was submitted.
  • +
  • OV_EINVAL indicates that an invalid argument value was submitted or that the stream represented by vf is not open.
  • OV_FALSE means the call returned a 'false' status, which in this case most likely indicates that the file is nonseekable and the upper, lower, and nominal bitrates were unset.
  • n indicates the bitrate for the given logical bitstream or the entire physical bitstream. If the file is open for random (seekable) access, it will @@ -54,20 +54,19 @@ functions.
  • -
    +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_bitrate_instant.html b/doc/vorbisfile/ov_bitrate_instant.html index 2a71d48..c35c8ca 100644 --- a/doc/vorbisfile/ov_bitrate_instant.html +++ b/doc/vorbisfile/ov_bitrate_instant.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_bitrate +Vorbisfile - function - ov_bitrate - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -33,33 +33,33 @@ long ov_bitrate_instant(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.

    Return Values

    -
  • -0 indicates the beginning of the file or unchanged bitrate info.
  • +
  • 0 indicates the beginning of the file or unchanged bitrate info.
  • n indicates the actual bitrate since the last call.
  • -
  • OV_FALSE indicates that the call returned a 'false' status. In this case, this error code is returned if playback is not in progress, and thus there is no instantaneous bitrate information to report.
  • +
  • OV_FALSE indicates that playback is not in progress, and thus there is no instantaneous bitrate information to report.
  • +
  • OV_EINVAL indicates that the stream represented by vf is not open.
  • +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_callbacks.html b/doc/vorbisfile/ov_callbacks.html index 9509d1e..7742921 100644 --- a/doc/vorbisfile/ov_callbacks.html +++ b/doc/vorbisfile/ov_callbacks.html @@ -1,15 +1,15 @@ -vorbisfile - datatype - ov_callbacks +Vorbisfile - datatype - ov_callbacks - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -19,22 +19,23 @@

    The ov_callbacks structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location. -

    -The ov_callbacks structure does not need to be user-defined if you are working with a standard file. The typical ov_open() call will fill ov_callbacks for you. However, ov_callbacks should be defined if you are using other data sources. In this situation, use ov_open_callbacks() instead of ov_open(). -

    -The callbacks are designed following the stdio functions fread, fseek, fclose, -and ftell. Except where otherwise noted below, they should work the same as -these functions do. -

    +The ov_callbacks structure does not need to be user-defined if you are +working with stdio-based file manipulation; the ov_open() call provides default callbacks for +stdio. ov_callbacks are defined and passed to ov_open_callbacks() when +implementing non-stdio based stream manipulation (such as playback +from a memory buffer). +

    @@ -37,7 +37,7 @@ int ov_pcm_seek(OggVorbis_File *vf,int64_t pos);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    pos
    Position in pcm samples to seek to in the bitstream.
    @@ -46,8 +46,7 @@ functions.

    Return Values

    -
  • -0 for success
  • +
  • 0 for success
  • nonzero indicates failure, described by several error codes:
  • @@ -61,22 +60,22 @@ nonzero indicates failure, described by several error codes:
  • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
  • -
  • OV_EBADLINK - Invalid stream section supplied to libvorbis/libvorbisfile, or the requested link is corrupt. +
  • OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  • +


    typedef struct {
       size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
    -  int    (*seek_func)  (void *datasource, int64_t offset, int whence);
    +  int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
       int    (*close_func) (void *datasource);
       long   (*tell_func)  (void *datasource);
     } ov_callbacks;
    @@ -45,31 +46,30 @@ these functions do.

    Relevant Struct Members

    read_func
    -
    Pointer to custom data reading function. Read up to size*nmemb bytes from -the source into the buffer at ptr. Return the number of bytes read successfully. -Must return 0 if nothing can be read. Should also set errno if an error occurs, -in order to distinguish between error and EOF.
    +
    Pointer to custom data reading function.
    seek_func
    -
    Pointer to custom data seeking function. If your data source does not support -seeking, you must return -1. Returns 0 on success. Seeks to a position offset bytes from a position defined by whence. If whence is SEEK_SET, seek relative to the file start. If SEEK_CUR, seek is relative to current file position. If SEEK_END, relative to end of file.
    +
    Pointer to custom data seeking function. If the data source is not seekable (or the application wants the data source to be treated as unseekable at all times), the provided seek callback should always return -1 (failure).
    close_func
    -
    Pointer to custom data source closure function. This should clear any -resources used by the data source, such as open files or network sockets. Returns 0.
    +
    Pointer to custom data source closure function.
    tell_func
    -
    Pointer to custom data location function. Returns the current offset (from the start) of the data stream. If your source is non-seekable, this need not be -implemented.
    +
    Pointer to custom data location function.
    +

    + +See the callbacks and non-stdio I/O document for more +detailed information on required behavior of the various callback +functions.




    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    diff --git a/doc/vorbisfile/ov_clear.html b/doc/vorbisfile/ov_clear.html index 81eb0ea..82aad05 100644 --- a/doc/vorbisfile/ov_clear.html +++ b/doc/vorbisfile/ov_clear.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_clear +Vorbisfile - function - ov_clear - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -17,8 +17,11 @@

    declared in "vorbis/vorbisfile.h";

    -

    After a bitstream has been opened using ov_open and decoding is complete, you must call ov_clear() to clear -the decoder's buffers and close the file for you. +

    After a bitstream has been opened using ov_open()/ov_open_callbacks() and decoding is complete, the application must call ov_clear() to clear +the decoder's buffers and close the file.

    + +ov_clear() must also be called after a successful call to ov_test() or ov_test_callbacks().

    +

    @@ -33,15 +36,14 @@ int ov_clear(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions. After ov_clear has been called, the structure is deallocated and can no longer be used.

    Return Values

    -
  • -0 for success
  • +
  • 0 for success
  • @@ -49,15 +51,14 @@ functions. After ov_clear has been called, the structure is deallocate
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_comment.html b/doc/vorbisfile/ov_comment.html index 654fa98..062e8e3 100644 --- a/doc/vorbisfile/ov_comment.html +++ b/doc/vorbisfile/ov_comment.html @@ -1,15 +1,16 @@ -vorbisfile - function - ov_bitrate +Vorbisfile - function - ov_bitrate + - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -34,7 +35,7 @@ vorbis_comment *ov_comment(OggVorbis_File *vf,int link);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    i
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the vorbis_comment struct for the current bitstream, this parameter should be set to -1.
    @@ -47,19 +48,19 @@ functions.
  • NULL if the specified bitstream does not exist or the file has been initialized improperly.
  • +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_info.html b/doc/vorbisfile/ov_info.html index e410274..51976a0 100644 --- a/doc/vorbisfile/ov_info.html +++ b/doc/vorbisfile/ov_info.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_info +Vorbisfile - function - ov_info - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -33,9 +33,8 @@ vorbis_info *ov_info(OggVorbis_File *vf,int li

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.
    i
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the vorbis_info struct for the current bitstream, this parameter should be set to -1.
    @@ -47,19 +46,19 @@ struct should be passed to all the vorbisfile functions.
  • NULL if the specified bitstream does not exist or the file has been initialized improperly.
  • +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_open.html b/doc/vorbisfile/ov_open.html index 095c453..93a096b 100644 --- a/doc/vorbisfile/ov_open.html +++ b/doc/vorbisfile/ov_open.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_open +Vorbisfile - function - ov_open - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -22,20 +22,24 @@ structure. It sets up all the related decoding structure.

    The first argument must be a file pointer to an already opened file or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream). vf should be a pointer to the -OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +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 vorbisfile functions. +struct should be passed to all the libvorbisfile functions.

    Also, you should be aware that ov_open(), once successful, takes complete possession of the file resource. After you have opened a file using ov_open(), you MUST close it using ov_clear(), not fclose() or any other function.

    It is often useful to call ov_open() simply to determine whether a given file is a vorbis bitstream. If the ov_open() -call fails, then the file is not recognizable as such. When you use ov_open() +call fails, then the file is not recognizable as such. +When you use ov_open() for this, you should fclose() the file pointer if, and only if, the ov_open() call fails. If it succeeds, you must call ov_clear() to clear -the decoder's buffers and close the file for you. +the decoder's buffers and close the file for you.

    + +(Note that ov_test() provides a less expensive way to test a file for Vorbisness.)

    +

    @@ -54,9 +58,9 @@ int ov_open(FILE *f,OggVorbis_File *vf,char *i or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    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 vorbisfile functions.
    +struct should be passed to all the libvorbisfile functions.
    initial
    Typically set to NULL. This parameter is useful if some data has already been read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial @@ -70,8 +74,7 @@ should contain the length (in bytes) of the buffer. Used together with init

    Return Values

    -
  • -0 for success
  • +
  • 0 indicates success
  • less than zero for failure:
    • @@ -92,21 +95,21 @@ thread. This is important because ov_open() may be a fairly time-consum 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). +example). See Thread Safety for other information on using libvorbisfile with threads. +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_open_callbacks.html b/doc/vorbisfile/ov_open_callbacks.html index 2c28c76..c6455a9 100644 --- a/doc/vorbisfile/ov_open_callbacks.html +++ b/doc/vorbisfile/ov_open_callbacks.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_open_callbacks +Vorbisfile - function - ov_open_callbacks - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -20,7 +20,7 @@

    This is an alternative function used to open and initialize an OggVorbis_File structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structure.

    Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions. +struct should be passed to all the libvorbisfile functions.

    It is often useful to call ov_open_callbacks() simply to determine whether a given file is a vorbis bitstream. If the @@ -30,7 +30,10 @@ call fails, then the file is not recognizable as such. When you use ov_open_ this, you should fclose() the file pointer if, and only if, the ov_open_callbacks() call fails. If it succeeds, you must call ov_clear() to clear -the decoder's buffers and close the file for you. +the decoder's buffers and close the file for you.

    + +See also Callbacks and Non-stdio I/O for information on designing and specifying the required callback functions.

    +

    @@ -49,9 +52,9 @@ int ov_open_callbacks(void *datasource, OggVorbis_ or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    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 vorbisfile functions.
    +struct should be passed to all the libvorbisfile functions.
    initial
    Typically set to NULL. This parameter is useful if some data has already been read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial @@ -67,8 +70,7 @@ should contain the length (in bytes) of the buffer. Used together with init

    Return Values

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

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_pcm_seek.html b/doc/vorbisfile/ov_pcm_seek.html index 1861d80..d662966 100644 --- a/doc/vorbisfile/ov_pcm_seek.html +++ b/doc/vorbisfile/ov_pcm_seek.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_bitrate +Vorbisfile - function - ov_pcm_seek - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -28,7 +28,7 @@ the newly seeked to position.

    
    -int ov_pcm_seek(OggVorbis_File *vf,int64_t pos);
    +int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos);
     
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_pcm_seek_page.html b/doc/vorbisfile/ov_pcm_seek_page.html index e0f248e..8f53316 100644 --- a/doc/vorbisfile/ov_pcm_seek_page.html +++ b/doc/vorbisfile/ov_pcm_seek_page.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_pcm_seek_page +Vorbisfile - function - ov_pcm_seek_page - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -38,7 +38,7 @@ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    pos
    Position in pcm samples to seek to in the bitstream.
    @@ -62,22 +62,22 @@ nonzero indicates failure, described by several error codes:
  • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
  • -
  • OV_EBADLINK - Invalid stream section supplied to libvorbis/libvorbisfile, or the requested link is corrupt. +
  • OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  • - + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_pcm_tell.html b/doc/vorbisfile/ov_pcm_tell.html index f277a41..e4768ce 100644 --- a/doc/vorbisfile/ov_pcm_tell.html +++ b/doc/vorbisfile/ov_pcm_tell.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_pcm_tell +Vorbisfile - function - ov_pcm_tell - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -24,7 +24,7 @@
    
    -int64_t ov_pcm_tell(OggVorbis_File *vf);
    +ogg_int64_t ov_pcm_tell(OggVorbis_File *vf);
     
    @@ -33,7 +33,7 @@ int64_t ov_pcm_tell(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    @@ -41,21 +41,23 @@ functions.

    Return Values

  • n indicates the current offset in samples.
  • +
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_pcm_total.html b/doc/vorbisfile/ov_pcm_total.html index 659e00b..9cab163 100644 --- a/doc/vorbisfile/ov_pcm_total.html +++ b/doc/vorbisfile/ov_pcm_total.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_pcm_total +Vorbisfile - function - ov_pcm_total - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -24,7 +24,7 @@
    
    -int64_t ov_pcm_total(OggVorbis_File *vf,int i);
    +ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i);
     
    @@ -33,7 +33,7 @@ int64_t ov_pcm_total(OggVorbis_File *vf,int i);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    i
    Link to the desired logical bitstream. To retrieve the total pcm samples for the entire physical bitstream, this parameter should be set to -1.
    @@ -48,19 +48,20 @@ total length in pcm samples of content if i=-1.
  • length in pcm samples of logical bitstream if i=1 to n.
  • + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_raw_seek.html b/doc/vorbisfile/ov_raw_seek.html index f5d6b6d..882b7a2 100644 --- a/doc/vorbisfile/ov_raw_seek.html +++ b/doc/vorbisfile/ov_raw_seek.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_raw_seek +Vorbisfile - function - ov_raw_seek - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -21,7 +21,7 @@

    This also updates everything needed within the decoder, so you can immediately call ov_read() and get data from the newly seeked to position. -

    When seek speed is a priority, this is the best vorbisfile seek funtion to use. +

    When seek speed is a priority, this is the best seek funtion to use.

    @@ -36,9 +36,8 @@ int ov_raw_seek(OggVorbis_File *vf,long pos);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.
    pos
    Position in compressed bytes to seek to in the bitstream.
    @@ -46,32 +45,31 @@ struct should be passed to all the vorbisfile functions.

    Return Values

    -
  • -0 indicates success
  • +
  • 0 indicates success
  • nonzero indicates failure, described by several error codes:
    • OV_ENOSEEK - Bitstream is not seekable.
    • OV_EINVAL - Invalid argument value.
    • -
    • OV_EBADLINK - Invalid stream section supplied to libvorbis/libvorbisfile, or the requested link is corrupt. +
    • OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.

    +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_raw_tell.html b/doc/vorbisfile/ov_raw_tell.html index d2b649d..780efc5 100644 --- a/doc/vorbisfile/ov_raw_tell.html +++ b/doc/vorbisfile/ov_raw_tell.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_raw_tell +Vorbisfile - function - ov_raw_tell - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -24,7 +24,7 @@

    
    -int64_t ov_raw_tell(OggVorbis_File *vf);
    +ogg_int64_t ov_raw_tell(OggVorbis_File *vf);
     
    @@ -33,7 +33,7 @@ int64_t ov_raw_tell(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    @@ -41,21 +41,23 @@ functions.

    Return Values

  • n indicates the current offset in bytes.
  • +
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_raw_total.html b/doc/vorbisfile/ov_raw_total.html index 9732a0d..7a5cee3 100644 --- a/doc/vorbisfile/ov_raw_total.html +++ b/doc/vorbisfile/ov_raw_total.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_raw_total +Vorbisfile - function - ov_raw_total - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -24,7 +24,7 @@
    
    -int64_t ov_raw_total(OggVorbis_File *vf,int i);
    +ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i);
     
    @@ -33,34 +33,36 @@ int64_t ov_raw_total(OggVorbis_File *vf,int i);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    i
    -
    Link to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1.
    +
    Link to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1.

    Return Values

  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is nonseekable
  • -
  • +
  • n total length in compressed bytes of content if i=-1.
  • -
  • length in compressed bytes of logical bitstream if i=1 to n.
  • +
  • n length in compressed bytes of logical bitstream if i=1 to n.
  • + + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_read.html b/doc/vorbisfile/ov_read.html index 0905268..1673ea8 100644 --- a/doc/vorbisfile/ov_read.html +++ b/doc/vorbisfile/ov_read.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_read +Vorbisfile - function - ov_read - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -18,24 +18,28 @@

    declared in "vorbis/vorbisfile.h";

    - This is the main function used to decode a Vorbis file within a loop. -

    - This function deals with more complicated bitstream chaining issues. - Up to this point, everything could more or less hide the multiple - logical bitstream nature of chaining from the toplevel application - if the toplevel application didn't particularly care. However, when we actually read audio back, we must be aware that multiple bitstream sections do not necessarily - have to have the same number of channels or sampling rate. -

    - ov_read() passes back the index of the sequential logical - bitstream currently being decoded along with the PCM data in order - that the toplevel application can take action on channel/sample rate - changes. This number will be incremented at chaining boundaries even - for non-seekable streams. For seekable streams, it represents the - actual chaining index within the physical bitstream. -ov_read() passes back the logical bitstream number currently - being decoded along with the PCM data in order that the toplevel - application can take action on channel/sample rate changes. -

    + This is the main function used to decode a Vorbis file within a + loop. It returns up to the specified number of bytes of decoded PCM audio + in the requested endianness, signedness, and word size. If the audio is + multichannel, the channels are interleaved in the output buffer. + If the passed in buffer is large, ov_read() will not fill + it; the passed in buffer size is treated as a limit and + not a request. +

    + +Note that up to this point, the Vorbisfile API could more or less hide the + multiple logical bitstream nature of chaining from the toplevel + application if the toplevel application didn't particularly care. + However, when reading audio back, the application must be aware + that multiple bitstream sections do not necessarily use the same + number of channels or sampling rate.

    ov_read() passes + back the index of the sequential logical bitstream currently being + decoded (in *bitstream) along with the PCM data in order + that the toplevel application can handle channel and/or sample + rate changes. This number will be incremented at chaining + boundaries even for non-seekable streams. For seekable streams, it + represents the actual chaining index within the physical bitstream. +



    @@ -51,16 +55,18 @@ long ov_read(OggVorbis_File *vf, char *buffer,

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile functions.
    buffer
    A pointer to an output buffer. The decoded output is inserted into this buffer.
    length
    Number of bytes to be read into the buffer. Should be the same size as the buffer. A typical value is 4096.
    bigendianp
    -
    Specifies big or little endian byte packing. 0 for little endian, 1 for big endian. Typical value is 0.
    +
    Specifies big or little endian byte packing. 0 for little endian, 1 for b +ig endian. Typical value is 0.
    word
    -
    Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2.
    +
    Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or +16-bit samples. Typical value is 2.
    sgned
    Signed or unsigned data. 0 for unsigned, 1 for signed. Typically 1.
    bitstream
    @@ -98,20 +104,20 @@ This reads up to 4096 bytes into a buffer, with signed 16-bit little-endian samples.

    -
    + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_read_float.html b/doc/vorbisfile/ov_read_float.html index 496f964..041911c 100644 --- a/doc/vorbisfile/ov_read_float.html +++ b/doc/vorbisfile/ov_read_float.html @@ -1,7 +1,7 @@ -vorbisfile - function - ov_read_float +Vorbisfile - function - ov_read_float @@ -9,7 +9,7 @@ - +

    vorbisfile documentation

    vorbisfile - 20011218

    libVorbisfile version 1.65 - 20020702

    @@ -74,7 +74,7 @@ functions. bytes_read = ov_read_float(&vf,pcm,&current_section) -This decodes one packets worth of float samples. +This decodes one packet's worth of float samples.


    @@ -82,11 +82,11 @@ This decodes one packets worth of float samples.
    - + - +

    copyright © 2001 vorbis team

    copyright © 2002 vorbis team

    Ogg Vorbis
    team@vorbis.org

    vorbisfile documentation

    vorbisfile - 20011218

    libVorbisfile version 1.65 - 20020702

    @@ -94,3 +94,6 @@ This decodes one packets worth of float samples. + + + diff --git a/doc/vorbisfile/ov_seekable.html b/doc/vorbisfile/ov_seekable.html index e369ee9..3db22b1 100644 --- a/doc/vorbisfile/ov_seekable.html +++ b/doc/vorbisfile/ov_seekable.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_seekable +Vorbisfile - function - ov_seekable - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -34,32 +34,30 @@ long ov_seekable(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.

    Return Values

    -
  • -0 indicates that the file is not seekable.
  • -
  • 1 indicates that the file is seekable.
  • +
  • 0 indicates that the file is not seekable.
  • +
  • nonzero indicates that the file is seekable.
  • +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_serialnumber.html b/doc/vorbisfile/ov_serialnumber.html index 0c2a733..15d920d 100644 --- a/doc/vorbisfile/ov_serialnumber.html +++ b/doc/vorbisfile/ov_serialnumber.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_serialnumber +Vorbisfile - function - ov_serialnumber - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -17,7 +17,7 @@

    declared in "vorbis/vorbisfile.h";

    -

    Returns the serialnumber of the specified logical bitstream. +

    Returns the serialnumber of the specified logical bitstream link number within the overall physical bitstream.

    @@ -33,11 +33,10 @@ long ov_serialnumber(OggVorbis_File *vf,int i);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.
    i
    -
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the vorbis_info struct for the current bitstream, this parameter should be set to -1.
    +
    Link to the desired logical bitstream. For nonseekable files, this argument is ignored. To retrieve the serial number of the current bitstream, this parameter should be set to -1.
    @@ -49,19 +48,20 @@ struct should be passed to all the vorbisfile functions.
  • Returns the serial number of the logical bitstream i or the serial number of the current bitstream if the file is nonseekable.
  • + +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_streams.html b/doc/vorbisfile/ov_streams.html index ba4b31e..c04c4cf 100644 --- a/doc/vorbisfile/ov_streams.html +++ b/doc/vorbisfile/ov_streams.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_streams +Vorbisfile - function - ov_streams - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -33,9 +33,8 @@ long ov_streams(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.
    @@ -47,19 +46,19 @@ struct should be passed to all the vorbisfile functions.

    +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_test.html b/doc/vorbisfile/ov_test.html index f1afafb..8c09e9c 100644 --- a/doc/vorbisfile/ov_test.html +++ b/doc/vorbisfile/ov_test.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_test +Vorbisfile - function - ov_test - - + +

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -41,9 +41,9 @@ int ov_test(FILE *f,OggVorbis_File *vf,char *i or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    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 vorbisfile functions.
    +struct should be passed to all the libvorbisfile functions.
    initial
    Typically set to NULL. This parameter is useful if some data has already been read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial @@ -57,8 +57,7 @@ should contain the length (in bytes) of the buffer. Used together with init

    Return Values

    -
  • -0 for success
  • +
  • 0 for success
  • less than zero for failure:
    • @@ -71,19 +70,20 @@ should contain the length (in bytes) of the buffer. Used together with init

    + +


    - - + + - - + +

    copyright © 2001 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_test_callbacks.html b/doc/vorbisfile/ov_test_callbacks.html index 9de6b0e..90f4a93 100644 --- a/doc/vorbisfile/ov_test_callbacks.html +++ b/doc/vorbisfile/ov_test_callbacks.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_test_callbacks +Vorbisfile - function - ov_test_callbacks - - + +

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -18,9 +18,9 @@

    declared in "vorbis/vorbisfile.h";

    This is an alternative function used to open and test an OggVorbis_File -structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structure. +structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structures.

    Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions. +struct should be passed to all the libvorbisfile functions.



    @@ -40,9 +40,9 @@ int ov_test_callbacks(void *datasource, OggVorbis_ or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    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 vorbisfile functions.
    +struct should be passed to all the libvorbisfile functions.
    initial
    Typically set to NULL. This parameter is useful if some data has already been read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial @@ -58,8 +58,7 @@ should contain the length (in bytes) of the buffer. Used together with init

    Return Values

    -
  • -0 for success
  • +
  • 0 for success
  • less than zero for failure:
    • OV_EREAD - A read from media returned an error.
    • @@ -71,18 +70,21 @@ should contain the length (in bytes) of the buffer. Used together with init

    + + + +


    - - + + - - + +

    copyright © 2001 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_test_open.html b/doc/vorbisfile/ov_test_open.html index f997bc8..7479a08 100644 --- a/doc/vorbisfile/ov_test_open.html +++ b/doc/vorbisfile/ov_test_open.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_test_open +Vorbisfile - function - ov_test_open - - + +

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -35,9 +35,9 @@ int ov_test_open(
    OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile +
    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 vorbisfile functions.
    +struct should be passed to all the libvorbisfile functions.
    @@ -57,19 +57,26 @@ struct should be passed to all the vorbisfile functions.

    +


    - - + + - - + +

    copyright © 2001 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - + + + + + + + diff --git a/doc/vorbisfile/ov_time_seek.html b/doc/vorbisfile/ov_time_seek.html index 8e88e9c..0a42055 100644 --- a/doc/vorbisfile/ov_time_seek.html +++ b/doc/vorbisfile/ov_time_seek.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_time_seek +Vorbisfile - function - ov_time_seek - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -21,14 +21,14 @@ streams, this seeks to the given time. For implementing seeking in a player, this is the only function generally needed. This also updates everything needed within the decoder, so you can immediately call ov_read() and get data from -the newly seeked to position. For obvious reasons, this doesn't work for unseekable streams. +the newly seeked to position. This function does not work for unseekable streams.

    @@ -38,7 +38,7 @@ int ov_time_seek(OggVorbis_File *vf, double se
    vf
    Pointer to our already opened and initialized OggVorbis_File structure.
    -
    seconds
    +
    ms
    Location to seek to within the file, specified in seconds.
    @@ -57,15 +57,14 @@ Nonzero for failure
    
    -int ov_time_seek(OggVorbis_File *vf, double seconds);
    +int ov_time_seek(OggVorbis_File *vf, double s);
     
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_time_seek_page.html b/doc/vorbisfile/ov_time_seek_page.html index 06726f9..4a5a24d 100644 --- a/doc/vorbisfile/ov_time_seek_page.html +++ b/doc/vorbisfile/ov_time_seek_page.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_time_seek_page +Vorbisfile - function - ov_time_seek_page - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -22,14 +22,14 @@ streams, this seeks to closest full page preceding the given time. This functio

    This function also updates everything needed within the decoder, so you can immediately call ov_read() and get data from the newly seeked to position. -

    For obvious reasons, this doesn't work for unseekable streams. +

    This function does not work for unseekable streams.

    @@ -39,7 +39,7 @@ int ov_time_seek_page(OggVorbis_File *vf, doub
    vf
    Pointer to our already opened and initialized OggVorbis_File structure.
    -
    seconds
    +
    ms
    Location to seek to within the file, specified in seconds.
    @@ -61,7 +61,7 @@ nonzero indicates failure, described by several error codes:
  • OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
  • -
  • OV_EBADLINK - Invalid stream section supplied to libvorbis/libvorbisfile, or the requested link is corrupt. +
  • OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  • @@ -70,15 +70,14 @@ nonzero indicates failure, described by several error codes:
    
    -int ov_time_seek_page(OggVorbis_File *vf, double seconds);
    +int ov_time_seek_page(OggVorbis_File *vf, double s);
     
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_time_tell.html b/doc/vorbisfile/ov_time_tell.html index 1377926..fc2179d 100644 --- a/doc/vorbisfile/ov_time_tell.html +++ b/doc/vorbisfile/ov_time_tell.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_bitrate +Vorbisfile - function - ov_time_tell - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -17,7 +17,7 @@

    declared in "vorbis/vorbisfile.h";

    -

    Returns the current offset in seconds. +

    Returns the current decoding offset in seconds.

    @@ -33,31 +33,31 @@ double ov_time_tell(OggVorbis_File *vf);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.

    Return Values

    -
  • n indicates the current offset in bytes.
  • +
  • n indicates the current decoding time offset in seconds.
  • +
  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
  • +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/ov_time_total.html b/doc/vorbisfile/ov_time_total.html index 1fa81a5..a4c904e 100644 --- a/doc/vorbisfile/ov_time_total.html +++ b/doc/vorbisfile/ov_time_total.html @@ -1,15 +1,15 @@ -vorbisfile - function - ov_time_total +Vorbisfile - function - ov_time_total - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -35,40 +35,33 @@ double ov_time_total(OggVorbis_File *vf,int i);

    Parameters

    vf
    -
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile -functions. Once this has been called, the same OggVorbis_File -struct should be passed to all the vorbisfile functions.
    +
    A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile +functions.
    i
    -
    Link to the desired logical bitstream. To retrieve the vorbis_info struct for the current bitstream, this parameter should be set to -1.
    +
    Link to the desired logical bitstream. To retrieve the time total for the entire physical bitstream, this parameter should be set to -1.

    Return Values

  • OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is nonseekable.
  • -
  • -total length in seconds of content if i=-1.
  • -
  • length in seconds of logical bitstream if i=1 to n.
  • +
  • n total length in seconds of content if i=-1.
  • +
  • n length in seconds of logical bitstream if i=1 to n.
  • -

    Notes

    -

    Typical usage: bytes_read = ov_read(&vf, buffer, 4096,0,2,1,&current_section) -
    This reads up to 4096 bytes into a buffer, with signed 16-bit little-endian -samples. -
    +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/overview.html b/doc/vorbisfile/overview.html index a4aea2b..bc1a790 100644 --- a/doc/vorbisfile/overview.html +++ b/doc/vorbisfile/overview.html @@ -1,23 +1,27 @@ -libvorbisfile - API Overview +Vorbisfile - API Overview - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    -

    VorbisFile API Overview

    +

    Vorbisfile API Overview

    -

    The makeup of the vorbisfile API is relatively simple. It revolves around a single file resource. This resource is passed to the Vorbisfile API, where it is opened, manipulated, and closed, in the form of an OggVorbis_File struct. +

    The makeup of the Vorbisfile libvorbisfile library API is relatively +simple. It revolves around a single file resource. This file resource is +passed to libvorbisfile, where it is opened, manipulated, and closed, +in the form of an OggVorbis_File +struct.

    -The vorbisfile API consists of the following functional categories: +The Vorbisfile API consists of the following functional categories:

    +

    +In addition, the following subjects deserve attention additional to +the above general overview: +

    +

    +

    +


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    + diff --git a/doc/vorbisfile/reference.html b/doc/vorbisfile/reference.html index 770baca..6ee1ee2 100644 --- a/doc/vorbisfile/reference.html +++ b/doc/vorbisfile/reference.html @@ -8,8 +8,8 @@ - - + +

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -32,12 +32,13 @@
    Decoding
    ov_read()
    -ov_read_float()

    Seeking
    ov_raw_seek()
    ov_pcm_seek()
    ov_time_seek()
    +ov_pcm_seek_page()
    +ov_time_seek_page()

    File Information
    ov_bitrate()
    @@ -53,15 +54,19 @@ ov_time_tell()
    ov_info()
    ov_comment()
    +
    +Return Codes
    + +


    - - + + - - + +

    copyright © 2001 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile - 20011218

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    diff --git a/doc/vorbisfile/seeking.html b/doc/vorbisfile/seeking.html index 6b5ac18..391667c 100644 --- a/doc/vorbisfile/seeking.html +++ b/doc/vorbisfile/seeking.html @@ -1,24 +1,32 @@ -vorbisfile - Seeking +Vorbisfile - Seeking - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    Seeking

    Seeking functions allow you to specify a specific point in the stream to begin or continue decoding.

    -All the vorbisfile seeking routines are declared in "vorbis/vorbisfile.h". -

    -

    Certain seeking functions are best suited to different situations. When speed is important, page-level seeking should be used. +All libvorbisfile seeking routines are declared in "vorbis/vorbisfile.h". + +

    Certain seeking functions are best suited to different situations. +When speed is important and exact positioning isn't required, +page-level seeking should be used. Note also that Vorbis files do not +necessarily start at a sample number or time offset of zero. Do not +be surprised if a file begins at a positive offset of several minutes +or hours, such as would happen if a large stream (such as a concert +recording) is chopped into multiple separate files. Requesting to +seek to a position before the beginning of such a file will seek to +the position where audio begins.

    @@ -29,23 +37,23 @@ All the vorbisfile seeking routines are declared in "vorbis/vorbisfile.h" ov_raw_seek - This function seeks to a specific byte in the bitstream, specified in bytes. + This function seeks to a position specified in the compressed bitstream, specified in bytes. ov_pcm_seek - This function seeks to a specific point in the bitstream, specified in pcm samples. + This function seeks to a specific audio sample number, specified in pcm samples. - ov_pcm_seek_page - This function seeks to the closest page preceding a point in the bitstream, specified in pcm samples. + ov_pcm_seek_page + This function seeks to the closest page preceding the specified audio sample number, specified in pcm samples. ov_time_seek - This function seeks to a time in the bitstream, specified in seconds. The easiest and simplest seeking method. + This function seeks to the specific time location in the bitstream, specified in integer milliseconds. Note that this differs from the reference vorbisfile implementation, which takes seconds as a float. ov_time_seek_page - This function seeks to the closest page preceding a time in the bitstream, specified in seconds. + This function seeks to the closest page preceding the specified time position in the bitstream, specified in integer milliseconds. @@ -53,15 +61,14 @@ All the vorbisfile seeking routines are declared in "vorbis/vorbisfile.h"


    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    - diff --git a/doc/vorbisfile/vorbis_comment.html b/doc/vorbisfile/vorbis_comment.html index 53f5b74..578c185 100644 --- a/doc/vorbisfile/vorbis_comment.html +++ b/doc/vorbisfile/vorbis_comment.html @@ -1,15 +1,15 @@ -vorbisfile - datatype - vorbis_comment +Vorbisfile - datatype - vorbis_comment - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -31,8 +31,9 @@ or set to some reasonable default (usually 0).
    typedef struct vorbis_comment{
       /* unlimited user comment fields. */
       char **user_comments;
    -  int    comments;
    -  char  *vendor;
    +  int  *comment_lengths;
    +  int  comments;
    +  char *vendor;
     
     } vorbis_comment;
    @@ -42,7 +43,9 @@ or set to some reasonable default (usually 0).

    Parameters

    user_comments
    -
    Unlimited user comment array. Comments stored in normal C 0-terminated strings.
    +
    Unlimited user comment array. The individual strings in the array are 8 bit clean, by the Vorbis specification, and as such the comment_lengths array should be consulted to determine string length. For convenience, each string is also NULL-terminated by the decode library (although Vorbis comments are not NULL terminated within the bitstream itself).
    +
    comment_lengths
    +
    An int array that stores the length of each comment string
    comments
    Int signifying number of user comments in user_comments field.
    vendor
    @@ -54,11 +57,11 @@ or set to some reasonable default (usually 0).
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    diff --git a/doc/vorbisfile/vorbis_info.html b/doc/vorbisfile/vorbis_info.html index b9ae7de..893e453 100644 --- a/doc/vorbisfile/vorbis_info.html +++ b/doc/vorbisfile/vorbis_info.html @@ -1,15 +1,15 @@ -vorbisfile - datatype - vorbis_info +Vorbisfile - datatype - vorbis_info - - + +

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    @@ -18,8 +18,7 @@

    declared in "vorbis/codec.h"

    -The vorbis_info structure contains information about a vorbis bitstream. Most of the information in this struct is more complex and in-depth than we need for vorbisfile decoding. However, the info's there if we need or want it. - +The vorbis_info structure contains basic information about the audio in a vorbis bitstream.

    @@ -33,33 +32,9 @@ The vorbis_info structure contains information about a vorbis bitstream. Most o long bitrate_upper; long bitrate_nominal; long bitrate_lower; + long bitrate_window; - long blocksizes[2]; - - int modes; - int maps; - int times; - int floors; - int residues; - int books; - int psys; /* encode only */ - - vorbis_info_mode *mode_param[64]; - int map_type[64]; - vorbis_info_mapping *map_param[64]; - int time_type[64]; - vorbis_info_time *time_param[64]; - int floor_type[64]; - vorbis_info_floor *floor_param[64]; - int residue_type[64]; - vorbis_info_residue *residue_param[64]; - static_codebook *book_param[256]; - vorbis_info_psy *psy_param[64]; /* encode only */ - - /* for block long/sort tuning; encode only */ - int envelopesa; - double preecho_thresh; - double preecho_clamp; + void *codec_setup; } vorbis_info; @@ -80,8 +55,11 @@ The vorbis_info structure contains information about a vorbis bitstream. Most o
    Specifies the average bitrate for a VBR bitstream. May be unset. If the bitrate_upper and bitrate_lower parameters match, the stream is fixed bitrate.
    bitrate_lower
    Specifies the lower limit in a VBR bitstream. If the value matches the bitrate_nominal and bitrate_upper parameters, the stream is fixed bitrate. May be unset if no limit exists.
    -
    blocksizes[2]
    -
    Contains the sizes of the long and short blocks for this particular bitstream. These are variable and can be set by the encoder. Vorbis only supports two sizes, long and short.
    +
    bitrate_window
    +
    Currently unset.
    + +
    codec_setup
    +
    Internal structure that contains the detailed/unpacked configuration for decoding the current Vorbis bitstream.
    @@ -89,11 +67,11 @@ The vorbis_info structure contains information about a vorbis bitstream. Most o
    - - + + - - + +

    copyright © 2000 vorbis team

    Ogg Vorbis
    team@vorbis.org

    copyright © 2002 Xiph.org

    Ogg Vorbis

    vorbisfile documentation

    vorbisfile version 1.25 - 20000615

    Vorbisfile documentation

    libVorbisfile version 1.65 - 20020702

    -- 2.7.4