Chris@1: Chris@1: Chris@1:
Chris@1:Vorbisfile documentation |
Chris@1: vorbisfile version 1.3.2 - 20101101 |
Chris@1:
declared in "vorbis/vorbisfile.h"
Chris@1: Chris@1:Chris@1: The OggVorbis_File structure defines an Ogg Vorbis file. Chris@1:
Chris@1: Chris@1: This structure is used in all libvorbisfile routines. Before it can Chris@1: be used, it must be initialized by ov_open(), ov_fopen(), or ov_open_callbacks(). Important Chris@1: Note: The use of ov_open() is Chris@1: discouraged under Windows due to a peculiarity of Windows linking Chris@1: convention; use ov_fopen() or ov_open_callbacks() instead. This Chris@1: caution only applies to Windows; use of ov_open() is appropriate for all other Chris@1: platforms. See the ov_open() page for more Chris@1: information. Chris@1: Chris@1:
Chris@1: After use, the OggVorbis_File structure must be deallocated with a Chris@1: call to ov_clear(). Chris@1: Chris@1:
Chris@1: Note that once a file handle is passed to a successful ov_open() call, the handle is owned by Chris@1: libvorbisfile and will be closed by libvorbisfile later during the Chris@1: call to ov_clear(). The handle should not Chris@1: be used or closed outside of the libvorbisfile API. Similarly, files Chris@1: opened by ov_fopen() will also be closed Chris@1: internally by vorbisfile in ov_clear().
Chris@1: Chris@1: ov_open_callbacks() allows the Chris@1: application to choose whether libvorbisfile will or will not close the Chris@1: handle in ov_clear(); see the ov_open_callbacks() page for more information.
Chris@1: Chris@1: If a call to ov_open() or ov_open_callbacks() fails, Chris@1: libvorbisfile does not assume ownership of the handle and the Chris@1: application is expected to close it if necessary. A failed ov_fopen() call will internally close the Chris@1: file handle if the open process fails.
Chris@1:
Chris@1:
Chris@1:
Chris@1: typedef struct { Chris@1: void *datasource; /* Pointer to a FILE *, etc. */ Chris@1: int seekable; Chris@1: ogg_int64_t offset; Chris@1: ogg_int64_t end; Chris@1: ogg_sync_state oy; Chris@1: Chris@1: /* If the FILE handle isn't seekable (eg, a pipe), only the current Chris@1: stream appears */ Chris@1: int links; Chris@1: ogg_int64_t *offsets; Chris@1: ogg_int64_t *dataoffsets; Chris@1: long *serialnos; Chris@1: ogg_int64_t *pcmlengths; Chris@1: vorbis_info *vi; Chris@1: vorbis_comment *vc; Chris@1: Chris@1: /* Decoding working state local storage */ Chris@1: ogg_int64_t pcm_offset; Chris@1: int ready_state; Chris@1: long current_serialno; Chris@1: int current_link; Chris@1: Chris@1: ogg_int64_t bittrack; Chris@1: ogg_int64_t samptrack; Chris@1: Chris@1: ogg_stream_state os; /* take physical pages, weld into a logical Chris@1: stream of packets */ Chris@1: vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ Chris@1: vorbis_block vb; /* local working space for packet->PCM decode */ Chris@1: Chris@1: ov_callbacks callbacks; Chris@1: Chris@1: } OggVorbis_File;Chris@1: |
Chris@1:
copyright © 2000-2010 Xiph.Org |
Chris@1: Chris@1: |
Vorbisfile documentation |
Chris@1: vorbisfile version 1.3.2 - 20101101 |
Chris@1: