"L. Spiro Engine"
Classes | Public Types | Static Public Member Functions | Static Protected Member Functions

lss::CVorbisFile Class Reference

Convenience library for opening/seeking/decoding. More...

#include <LSSVorbisFile.h>

List of all members.

Classes

struct  LSS_OV_CALLBACKS
struct  LSS_OV_FILE

Public Types

typedef struct
lss::CVorbisFile::LSS_OV_CALLBACKS
LPLSS_OV_CALLBACKS
typedef struct
lss::CVorbisFile::LSS_OV_CALLBACKS 
LPCLSS_OV_CALLBACKS
typedef struct
lss::CVorbisFile::LSS_OV_FILE
LPLSS_OV_FILE
typedef struct
lss::CVorbisFile::LSS_OV_FILE 
LPCLSS_OV_FILE

Static Public Member Functions

static LSBOOL LSE_CALL LoadOggFile (const LSCHAR *_pcFile, LSUINT8 *&_pui8Data, LSUINT32 &_ui32Length, LSUINT32 &_ui32Freq, LSUINT32 &_ui32Bits, LSUINT32 &_ui32Channels, CAllocator *_paAllocator)
static LSUINT64 LSE_CALL GetPcmCount (LSS_OV_FILE &_ovfFile)
static LSINT32 OvClear (LSS_OV_FILE *_povfFile)
static LSINT32 OvFOpen (const LSCHAR *_pcPath, LSS_OV_FILE *_povfFile)
static LSINT32 OvOpenCallbacks (LSVOID *_pvDataSource, LSS_OV_FILE *_povfFile, const LSCHAR *_pcInitial, LSINT32 _i32BytesI, LSS_OV_CALLBACKS _ocCallbacks)
static LSINT32 OvTestCallbacks (LSVOID *_pvDataSource, LSS_OV_FILE *_povfFile, const LSCHAR *_pcInitial, LSINT32 _i32BytesI, LSS_OV_CALLBACKS _ocCallbacks)
static LSINT32 OvTestOpen (LSS_OV_FILE *_povfFile)
static LSINT32 OvBitrate (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSINT32 OvBitrateInstant (LSS_OV_FILE *_povfFile)
static LSINT32 OvStreams (LSS_OV_FILE *_povfFile)
static LSINT32 OvSeekable (LSS_OV_FILE *_povfFile)
static LSINT32 OvSerialNumber (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSINT64 OvRawTotal (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSINT64 OvPcmTotal (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSDOUBLE OvTimeTotal (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSINT32 OvRawSeek (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OvPcmSeek (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OcPvmSeekPage (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OvTimeSeek (LSS_OV_FILE *_povfFile, LSDOUBLE _dPos)
static LSINT32 OvTimeSeekPage (LSS_OV_FILE *_povfFile, LSDOUBLE _dPos)
static LSINT32 OvRawSeekLap (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OvPcmSeekLap (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OvPcmSeekPageLap (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos)
static LSINT32 OvTimeSeekLap (LSS_OV_FILE *_povfFile, LSDOUBLE _dPos)
static LSINT32 OvTimeSeekPageLap (LSS_OV_FILE *_povfFile, LSDOUBLE _dPos)
static LSINT64 OvRawTell (LSS_OV_FILE *_povfFile)
static LSINT64 OvPcmTell (LSS_OV_FILE *_povfFile)
static LSDOUBLE OvTimeTell (LSS_OV_FILE *_povfFile)
static CVorbisCodec::vorbis_infoOvInfo (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static
CVorbisCodec::vorbis_comment
OvComment (LSS_OV_FILE *_povfFile, LSINT32 _i32I)
static LSINT32 OvReadFloat (LSS_OV_FILE *_povfFile, LSFLOAT ***_pppfPcmChannels, LSINT32 _i32Samples, LSINT32 *_pi32BitStream)
static LSINT32 OvReadFilter (LSS_OV_FILE *_povfFile, LSCHAR *_pcBuffer, LSINT32 _i32Length, LSINT32 _i32BigEndianP, LSINT32 _i32Word, LSINT32 _i32Signed, LSINT32 *_pi32BitStream, LSVOID(*_pfFilter)(LSFLOAT **_ppPcm, LSINT32 _i32Channels, LSINT32 _i32Samples, LSVOID *_pvFilterParam), LSVOID *_pvFilterParam)
static LSINT32 OvRead (LSS_OV_FILE *_povfFile, LSCHAR *_pcBuffer, LSINT32 _i32Length, LSINT32 _i32BigEndianP, LSINT32 _i32Word, LSINT32 _i32Signed, LSINT32 *_pi32BitStream)
static LSINT32 OvCrosslap (LSS_OV_FILE *_povfFile1, LSS_OV_FILE *_povfFile2)
static LSINT32 OvHalfRate (LSS_OV_FILE *_povfFile, LSINT32 _i32Flag)
static LSINT32 OvHalfRateP (LSS_OV_FILE *_povfFile)

Static Protected Member Functions

static LSINT32 OvOpen1 (LSVOID *_pvFile, LSS_OV_FILE *_povfFile, const LSCHAR *_pcInitial, LSINT32 _i32BytesI, LSS_OV_CALLBACKS _ocCallbacks)
static LSINT32 OvOpen2 (LSS_OV_FILE *_povfFile)
static LSINT32 OvFetchHeaders (LSS_OV_FILE *_povfFile, CVorbisCodec::vorbis_info *_pviVi, CVorbisCodec::vorbis_comment *_pvcVc, LSINT32 **_ppi32SerialNoList, LSINT32 *_pi32SerialNoN, COgg::ogg_page *_popOgPtr)
static LSINT32 OvOpenSeekable2 (LSS_OV_FILE *_povfFile)
static LSINT64 OvGetNextPage (LSS_OV_FILE *_povfFile, COgg::ogg_page *_popOg, LSINT64 _i64Boundary)
static LSINT32 OvLookUpPageSerialNo (COgg::ogg_page *_popOg, LSINT32 *_pi32SerialNoList, LSINT32 _i32N)
static LSVOID OvAddSerialNo (COgg::ogg_page *_popOg, LSINT32 **_ppi32SerialNoList, LSINT32 *_pi32N)
static LSINT64 OvInitialPcmOffset (LSS_OV_FILE *_povfFile, CVorbisCodec::vorbis_info *_pviInfo)
static LSINT64 OvGetPrevPageSerial (LSS_OV_FILE *_povfFile, LSINT32 *_pi32SerialList, LSINT32 _i32SerialCount, LSINT32 *_pi32SerialNo, LSINT64 *_pi64GranPos)
static LSINT32 OvBisectForwardSerialNo (LSS_OV_FILE *_povfFile, LSINT64 _i64Begin, LSINT64 _i64Searched, LSINT64 _i64End, LSINT64 _i64EndGran, LSINT32 _i32EndSerial, LSINT32 *_pi32CurrentNoList, LSINT32 _i32CurrentNoS, LSINT32 _i32M)
static LSINT32 OvGetData (LSS_OV_FILE *_povfFile)
static LSINT32 OvLookUpSerialNo (LSINT32 _i32S, LSINT32 *_pi32SerialNoList, LSINT32 _i32N)
static LSINT32 OvSeekHelper (LSS_OV_FILE *_povfFile, LSINT64 _i64Offset)
static LSVOID OvDecodeClear (LSS_OV_FILE *_povfFile)
static LSINT32 OvMakeDecodeReady (LSS_OV_FILE *_povfFile)
static LSINT32 OvFetchAndProcessPacket (LSS_OV_FILE *_povfFile, COgg::ogg_packet *_popOpIn, LSINT32 _i32ReadP, LSINT32 _i32SpanP)
static LSINT64 OvGetPrevPage (LSS_OV_FILE *_povfFile, COgg::ogg_page *_popPage)
static LSINT32 Ov64SeekLap (LSS_OV_FILE *_povfFile, LSINT64 _i64Pos, LSINT32(*_pfLocalSeek)(LSS_OV_FILE *, LSINT64))
static LSINT32 OvInitSet (LSS_OV_FILE *_povfFile)
static LSVOID OvGetLap (LSS_OV_FILE *_povfFile, CVorbisCodec::vorbis_info *_pviInfo, CVorbisCodec::vorbis_dsp_state *_pvdsVd, LSFLOAT **_ppfLapPcm, LSINT32 _i32LapSize)
static LSINT32 OvInitPrime (LSS_OV_FILE *_povfFile)
static LSVOID OvSplice (LSFLOAT **_ppfPcm, LSFLOAT **_ppfLapPcm, LSINT32 _i32N1, LSINT32 _i32N2, LSINT32 _i32Ch1, LSINT32 _i32Ch2, LSFLOAT *_pfW1, LSFLOAT *_pfW2)
static LSINT32 OvDSeekLap (LSS_OV_FILE *_povfFile, LSDOUBLE _dPos, LSINT32(*_pfLocalSeek)(LSS_OV_FILE *, LSDOUBLE))
static LSINT32 OvHostIsBigEndian ()
static LSUINTPTR ReadFunc (LSVOID *_pvPtr, LSUINTPTR _uiptrSize, LSUINTPTR _uiptrNMemb, LSVOID *_pvDataSource)
static LSINT32 SeekFunc (LSVOID *_pvDataSource, LSINT64 _i64Offset, LSINT32 _i32Whence)
static LSINT32 CloseFunc (LSVOID *_pvDataSource)
static LSINT64 TellFunc (LSVOID *_pvDataSource)

Detailed Description

Convenience library for opening/seeking/decoding.

Class CVorbisFile Description: Convenience library for opening/seeking/decoding.


Member Typedef Documentation

The LSS_OV_CALLBACKS structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location. The LSS_OV_CALLBACKS structure does not need to be user-defined if you are working with stdio-based file manipulation; the OvFOpen() and OvOpen() calls internally provide default callbacks for stdio. LSS_OV_CALLBACKS are defined and passed to OvOpenCallbacks() when implementing non-stdio based stream manipulation (such as playback from a memory buffer) or when OvOpen()-style initialization from a FILE * is required under Windows [a].

Ogg file data.


Member Function Documentation

static LSINT32 lss::CVorbisFile::CloseFunc ( LSVOID *  _pvDataSource) [static, protected]

Our custom close function.

Parameters:
_pvDataSourceFile handle to close.
Returns:
Returns 0 if the handle was closed, EOF otherwise.
static LSUINT64 LSE_CALL lss::CVorbisFile::GetPcmCount ( LSS_OV_FILE _ovfFile) [static]

Returns the actual number of PCM's in the given file.

Parameters:
_ovfFileThe file whose PCM count is to be obtained.
Returns:
Returns the number of PCM's in the given file.
static LSBOOL LSE_CALL lss::CVorbisFile::LoadOggFile ( const LSCHAR *  _pcFile,
LSUINT8 *&  _pui8Data,
LSUINT32 &  _ui32Length,
LSUINT32 &  _ui32Freq,
LSUINT32 &  _ui32Bits,
LSUINT32 &  _ui32Channels,
CAllocator *  _paAllocator 
) [static]

Load a given Ogg file to RAM, decompressing it and returning raw PCM data.

Parameters:
_pcFileThe file to load.
_pui8DataPointer filled with the file data allocated with _paAllocator.
_ui32LengthLength of the wave data in bytes.
_ui32FreqFrequency of the wave data.
_ui32BitsBits per sample of the wave data.
_ui32ChannelsChannels in the wave data.
_paAllocatorAllocator used to allocate _pui8Data, or NULL to use LSENEW.
Returns:
Returns false if the load fails or the file is not recognized as a valid Ogg file.
static LSINT32 lss::CVorbisFile::OcPvmSeekPage ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the closest page preceding the specified location (in pcm samples) within the physical bitstream. This function only works for seekable streams. This function is faster than OvPcmSeek() because the function can begin decoding at a page boundary rather than seeking through any remaining samples before the specified location. However, it is less accurate. This also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i64PosPosition in pcm samples to seek to in the bitstream.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::Ov64SeekLap ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos,
LSINT32(*)(LSS_OV_FILE *, LSINT64)  _pfLocalSeek 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_i64PosUndocumented parameter from the Vorbis library.
_pfLocalSeekUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSVOID lss::CVorbisFile::OvAddSerialNo ( COgg::ogg_page *  _popOg,
LSINT32 **  _ppi32SerialNoList,
LSINT32 *  _pi32N 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_popOgUndocumented parameter from the Vorbis library.
_ppi32SerialNoListUndocumented parameter from the Vorbis library.
_pi32NUndocumented parameter from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvBisectForwardSerialNo ( LSS_OV_FILE _povfFile,
LSINT64  _i64Begin,
LSINT64  _i64Searched,
LSINT64  _i64End,
LSINT64  _i64EndGran,
LSINT32  _i32EndSerial,
LSINT32 *  _pi32CurrentNoList,
LSINT32  _i32CurrentNoS,
LSINT32  _i32M 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_i64BeginUndocumented parameter from the Vorbis library.
_i64SearchedUndocumented parameter from the Vorbis library.
_i64EndUndocumented parameter from the Vorbis library.
_i64EndGranUndocumented parameter from the Vorbis library.
_i32EndSerialUndocumented parameter from the Vorbis library.
_pi32CurrentNoListUndocumented parameter from the Vorbis library.
_i32CurrentNoSUndocumented parameter from the Vorbis library.
_i32MUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvBitrate ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

This function returns the average bitrate for the specified logical bitstream. This may be different from the OvInfo->nominal_bitrate value, as it is based on the actual average for this bitstream if the file is seekable. Nonseekable files will return the nominal bitrate setting or the average of the upper and lower bounds, if any of these values are set.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink 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.
Returns:
OV_EINVAL indicates that an invalid argument value was submitted or that the stream represented by _povfFile 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 find the *actual* average bitrate. If the file is streaming (nonseekable), it returns the nominal bitrate (if set) or else the average of the upper/lower bounds (if set).
static LSINT32 lss::CVorbisFile::OvBitrateInstant ( LSS_OV_FILE _povfFile) [static]

Used to find the most recent bitrate played back within the file. Will return 0 if the bitrate has not changed or it is the beginning of the file.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
0 indicates the beginning of the file or unchanged bitrate info. n indicates the actual bitrate since the last call. 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 _povfFile is not open.
static LSINT32 lss::CVorbisFile::OvClear ( LSS_OV_FILE _povfFile) [static]

After a bitstream has been opened using OvFOpen()/OvOpen()/OvOpenCallbacks() and decoding is complete, the application must call OvClear() to clear the decoder's buffers. OvClear() will also close the file unless it was opened using OvOpenCallbacks() with the PfCloseFunc callback set to NULL. OvClear() must also be called after a successful call to OvTest() or OvTestCallbacks().

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. After OvClear has been called, the contents of this structure are deallocated, and it can no longer be used without being reinitialized by a call to OvFOpen(), OvOpen() or OvOpenCallbacks().
Returns:
Returns 0 for success.
static CVorbisCodec::vorbis_comment* lss::CVorbisFile::OvComment ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

Returns a pointer to the vorbis_comment struct for the specified bitstream. For nonseekable streams, returns the struct for the current bitstream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink 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.
Returns:
Returns the vorbis_comment struct for the specified bitstream. NULL if the specified bitstream does not exist or the file has been initialized improperly.
static LSINT32 lss::CVorbisFile::OvCrosslap ( LSS_OV_FILE _povfFile1,
LSS_OV_FILE _povfFile2 
) [static]

OvCrosslap overlaps and blends the boundary at a transition between two separate streams represented by separate LSS_OV_FILE structures. For lapping transitions due to seeking within a single stream represented by a single LSS_OV_FILE structure, consider using the lapping versions of the vorbisfile seeking functions instead. OvCrosslap is used between the last (usually OvRead()) call on the old stream and the first OvRead() from the new stream. Any desired positioning of the new stream must occur before the call to OvCrosslap() as a seek dumps all prior lapping information from a stream's decode state. Crosslapping does not introduce or remove any extraneous samples; positioning works exactly as if OvCrosslap was not called. OvCrosslap will lap between streams of differing numbers of channels. Any extra channels from the old stream are ignored; playback of these channels simply ends. Extra channels in the new stream are lapped from silence. OvCrosslap will also lap between streams links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly.

Parameters:
_povfFile1A pointer to the LSS_OV_FILE structure representing the origin stream from which to transition playback.
_povfFile2A pointer to the LSS_OV_FILE structure representing the stream with which playback continues.
Returns:
OV_EINVAL: crosslap called with an LSS_OV_FILE structure that isn't open. OV_EFAULT: internal error; implies a library bug or external heap corruption. OV_EREAD: A read from media returned an error. OV_EOF indicates stream _povfFile2 is at end of file, or that _povfFile1 is at end of file immediately after a seek (making crosslap impossible as there's no preceding decode state to crosslap). 0: success.
static LSVOID lss::CVorbisFile::OvDecodeClear ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvDSeekLap ( LSS_OV_FILE _povfFile,
LSDOUBLE  _dPos,
LSINT32(*)(LSS_OV_FILE *, LSDOUBLE)  _pfLocalSeek 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_dPosUndocumented parameter from the Vorbis library.
_pfLocalSeekUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvFetchAndProcessPacket ( LSS_OV_FILE _povfFile,
COgg::ogg_packet *  _popOpIn,
LSINT32  _i32ReadP,
LSINT32  _i32SpanP 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_popOpInUndocumented parameter from the Vorbis library.
_i32ReadPUndocumented parameter from the Vorbis library.
_i32SpanPUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvFetchHeaders ( LSS_OV_FILE _povfFile,
CVorbisCodec::vorbis_info _pviVi,
CVorbisCodec::vorbis_comment _pvcVc,
LSINT32 **  _ppi32SerialNoList,
LSINT32 *  _pi32SerialNoN,
COgg::ogg_page *  _popOgPtr 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_pviViUndocumented parameter from the Vorbis library.
_pvcVcUndocumented parameter from the Vorbis library.
_ppi32SerialNoListUndocumented parameter from the Vorbis library.
_pi32SerialNoNUndocumented parameter from the Vorbis library.
_popOgPtrUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvFOpen ( const LSCHAR *  _pcPath,
LSS_OV_FILE _povfFile 
) [static]

This is the simplest function used to open and initialize an LSS_OV_FILE structure. It sets up all the related decoding structure. The first argument is a file _pcPath suitable for passing to fopen(). _povfFile should be a pointer to an empty LSS_OV_FILE structure -- this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions. The _povfFile structure initialized using OvFOpen() must eventually be cleaned using OvClear(). It is often useful to call OvFOpen() simply to determine whether a given file is a Vorbis bitstream. If the OvFOpen() 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 _povfFile structure will not be used, the application is responsible for calling OvClear() to clear the decoder's buffers and close the file.

Parameters:
_pcPathNull terminated string containing a file _pcPath suitable for passing to fopen().
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvGetData ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSVOID lss::CVorbisFile::OvGetLap ( LSS_OV_FILE _povfFile,
CVorbisCodec::vorbis_info _pviInfo,
CVorbisCodec::vorbis_dsp_state _pvdsVd,
LSFLOAT **  _ppfLapPcm,
LSINT32  _i32LapSize 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_pviInfoUndocumented parameter from the Vorbis library.
_pvdsVdUndocumented parameter from the Vorbis library.
_ppfLapPcmUndocumented parameter from the Vorbis library.
_i32LapSizeUndocumented parameter from the Vorbis library.
static LSINT64 lss::CVorbisFile::OvGetNextPage ( LSS_OV_FILE _povfFile,
COgg::ogg_page *  _popOg,
LSINT64  _i64Boundary 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_popOgUndocumented parameter from the Vorbis library.
_i64BoundaryUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT64 lss::CVorbisFile::OvGetPrevPage ( LSS_OV_FILE _povfFile,
COgg::ogg_page *  _popPage 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_popPageUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT64 lss::CVorbisFile::OvGetPrevPageSerial ( LSS_OV_FILE _povfFile,
LSINT32 *  _pi32SerialList,
LSINT32  _i32SerialCount,
LSINT32 *  _pi32SerialNo,
LSINT64 *  _pi64GranPos 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_pi32SerialListUndocumented parameter from the Vorbis library.
_i32SerialCountUndocumented parameter from the Vorbis library.
_pi32SerialNoUndocumented parameter from the Vorbis library.
_pi64GranPosUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvHalfRate ( LSS_OV_FILE _povfFile,
LSINT32  _i32Flag 
) [static]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_i32FlagUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvHalfRateP ( LSS_OV_FILE _povfFile) [static]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvHostIsBigEndian ( ) [static, protected]

Undocumented function from the Vorbis library.

Returns:
Undocumented return from the Vorbis library.
static CVorbisCodec::vorbis_info* lss::CVorbisFile::OvInfo ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

Returns the vorbis_info struct for the specified bitstream. For nonseekable files, always returns the current vorbis_info struct.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink 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.
Returns:
Returns the vorbis_info struct for the specified bitstream. Returns vorbis_info for current bitstream if the file is nonseekable or _i32I=-1. NULL if the specified bitstream does not exist or the file has been initialized improperly.
static LSINT64 lss::CVorbisFile::OvInitialPcmOffset ( LSS_OV_FILE _povfFile,
CVorbisCodec::vorbis_info _pviInfo 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_pviInfoUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvInitPrime ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvInitSet ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvLookUpPageSerialNo ( COgg::ogg_page *  _popOg,
LSINT32 *  _pi32SerialNoList,
LSINT32  _i32N 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_popOgUndocumented parameter from the Vorbis library.
_pi32SerialNoListUndocumented parameter from the Vorbis library.
_i32NUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvLookUpSerialNo ( LSINT32  _i32S,
LSINT32 *  _pi32SerialNoList,
LSINT32  _i32N 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_i32SUndocumented parameter from the Vorbis library.
_pi32SerialNoListUndocumented parameter from the Vorbis library.
_i32NUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvMakeDecodeReady ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvOpen1 ( LSVOID *  _pvFile,
LSS_OV_FILE _povfFile,
const LSCHAR *  _pcInitial,
LSINT32  _i32BytesI,
LSS_OV_CALLBACKS  _ocCallbacks 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_pfFileUndocumented parameter from the Vorbis library.
_i64OffUndocumented parameter from the Vorbis library.
_i32WhenceUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library. Undocumented function from the Vorbis library.
Parameters:
_pvFileUndocumented parameter from the Vorbis library.
_povfFileUndocumented parameter from the Vorbis library.
_pcInitialUndocumented parameter from the Vorbis library.
_i32BytesIUndocumented parameter from the Vorbis library.
_ocCallbacksUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvOpen2 ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvOpenCallbacks ( LSVOID *  _pvDataSource,
LSS_OV_FILE _povfFile,
const LSCHAR *  _pcInitial,
LSINT32  _i32BytesI,
LSS_OV_CALLBACKS  _ocCallbacks 
) [static]

OvOpen is one of three initialization functions used to initialize an LSS_OV_FILE structure and prepare a bitstream for playback. WARNING for Windows developers: Do not use OvOpen() in Windows applications; Windows linking places restrictions on passing FILE * handles successfully, and OvOpen() runs afoul of these restrictions [a]. See the OvOpenCallbacks() page for details on using OvOpenCallbacks() instead. 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). _povfFile should be a pointer to the LSS_OV_FILE structure -- this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions. The _povfFile structure initialized using OvFOpen() must eventually be cleaned using OvClear(). Once a FILE * handle is passed to OvOpen() successfully, the application MUST NOT fclose() or in any other way manipulate that file handle. Vorbisfile will close the file in OvClear(). If the application must be able to close the FILE * handle itself, see OvOpenCallbacks() with the use of OV_CALLBACKS_NOCLOSE. It is often useful to call OvOpen() simply to determine whether a given file is a Vorbis bitstream. If the OvOpen() call fails, then the file is not recognizable as Vorbis. If the call succeeds but the initialized _povfFile structure will not be used, the application is responsible for calling OvClear() to clear the decoder's buffers and close the file. If [and only if] an OvOpen() call fails, the application must explicitly fclose() the FILE * pointer itself.

Parameters:
_pfFileFile pointer to an already opened file or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
_pcInitialTypically 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read.
_i32BytesITypically set to 0. This parameter is useful if some data has already been read from the file and the stream is not seekable. In this case, _i32BytesI should contain the length (in bytes) of the buffer. Used together with _pcInitial.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption. This is an alternative function used to open and initialize an LSS_OV_FILE structure when using a data source other than a file, when its necessary to modify default file access behavior, or to initialize a Vorbis decode from a FILE * pointer under Windows where OvOpen() cannot be used. It allows the application to specify custom file manipulation routines and sets up all the related decoding structures. Once OvOpenCallbacks() has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions. Unlike OvFOpen() and OvOpen(), OvOpenCallbacks() may be used to instruct vorbisfile to either automatically close or not to close the file/data access handle in OvClear(). Automatic closure is disabled by passing NULL as the close callback, or using one of the predefined callback sets that specify a NULL close callback. The application is responsible for closing a file when a call to OvOpenCallbacks() is unsuccessful. See also Callbacks and Non-stdio I/O for information on designing and specifying custom callback functions.
Parameters:
_pvDataSourcePointer to a data structure allocated by the calling application, containing any state needed by the _ocCallbacks provided.
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
_pcInitialTypically set to NULL. This parameter is useful if some data has already been read from the stream and the stream is not seekable. It is used in conjunction with _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read.
_i32BytesITypically set to 0. This parameter is useful if some data has already been read from the stream and the stream is not seekable. In this case, _i32BytesI should contain the length (in bytes) of the buffer. Used together with _pcInitial.
_ocCallbacksA completed LSS_OV_CALLBACKS struct which indicates desired custom file manipulation routines. vorbisfile.h defines several preprovided callback sets; see LSS_OV_CALLBACKS for details.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvOpenSeekable2 ( LSS_OV_FILE _povfFile) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvPcmSeek ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the offset specified (in pcm samples) within the physical bitstream. This function only works for seekable streams. This also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i64PosPosition in pcm samples to seek to in the bitstream.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvPcmSeekLap ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the offset specified (in pcm samples) within the physical bitstream. This variant of OvPcmSeek also automatically crosslaps the transition from the previous playback position into the new playback position in order to eliminate clicking and boundary discontinuities. Otherwise, usage and behavior is identical to OvPcmSeek. OvPcmSeekLap() also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. OvPcmSeekLap() will lap between logical stream links of differing numbers of channels. Any extra channels from the origin of the seek are ignored; playback of these channels simply ends. Extra channels at the destination are lapped from silence. OvPcmSeekLap() will also lap between logical stream links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly. This function only works for seekable streams.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i64PosPosition in pcm samples to seek to in the bitstream.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvPcmSeekPageLap ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the closest page preceding the specified location (in pcm samples) within the physical bitstream. This variant of OcPvmSeekPage() also automatically crosslaps the transition from the previous playback position into the new playback position in order to eliminate clicking and boundary discontinuities. Otherwise, usage and behavior is identical to OcPvmSeekPage(). This function is faster than OvPcmSeekLap() because the function can begin decoding at a page boundary rather than seeking through any remaining samples before the specified location. However, it is less accurate. OvPcmSeekPageLap also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. OvPcmSeekPageLap will lap between logical stream links of differing numbers of channels. Any extra channels from the origin of the seek are ignored; playback of these channels simply ends. Extra channels at the destination are lapped from silence. OvPcmSeekPageLap will also lap between logical stream links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly. This function only works for seekable streams.

Parameters:
_povfFileDESC
_i64PosDESC
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT64 lss::CVorbisFile::OvPcmTell ( LSS_OV_FILE _povfFile) [static]

Returns the current offset in samples.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
n indicates the current offset in samples. OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
static LSINT64 lss::CVorbisFile::OvPcmTotal ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

Returns the total pcm samples of the physical bitstream or a specified logical bitstream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink to the desired logical bitstream. To retrieve the total pcm samples for the entire physical bitstream, this parameter should be set to -1.
Returns:
OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist or the bitstream is unseekable. total length in pcm samples of content if _i32I=-1. length in pcm samples of logical bitstream if _i32I=0 to n.
static LSINT32 lss::CVorbisFile::OvRawSeek ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the offset specified (in compressed raw bytes) within the physical bitstream. This function only works for seekable streams. This also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. When seek speed is a priority, this is the best seek funtion to use.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i64PosPosition in compressed bytes to seek to in the bitstream.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvRawSeekLap ( LSS_OV_FILE _povfFile,
LSINT64  _i64Pos 
) [static]

Seeks to the offset specified (in compressed raw bytes) within the physical bitstream. This variant of OvRawSeek() also automatically crosslaps the transition from the previous playback position into the new playback position in order to eliminate clicking and boundary discontinuities. Otherwise, usage and behavior is identical to OvRawSeek(). When seek speed is a priority, but crosslapping is still desired, this is the best seek funtion to use. OvRawSeekLap also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. OvRawSeekLap will lap between logical stream links of differing numbers of channels. Any extra channels from the origin of the seek are ignored; playback of these channels simply ends. Extra channels at the destination are lapped from silence. OvRawSeekLap will also lap between logical stream links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly. This function only works for seekable streams.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i64PosPosition in compressed bytes to seek to in the bitstream.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT64 lss::CVorbisFile::OvRawTell ( LSS_OV_FILE _povfFile) [static]

Returns the current offset in raw compressed bytes. Note that if you later use OvRawSeek() to return to this point, you won't generally get back to exactly the same place, due to internal buffering. Also note that a read operation may not cause a change to the current raw offset - only a read that requires reading more data from the underlying data source will do that.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
n indicates the current offset in bytes. OV_EINVAL means that the argument was invalid. In this case, the requested bitstream did not exist.
static LSINT64 lss::CVorbisFile::OvRawTotal ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

Returns the total (compressed) bytes of the physical bitstream or a specified logical bitstream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1.
Returns:
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 _i32I=-1. n length in compressed bytes of logical bitstream if _i32I=0 to n.
static LSINT32 lss::CVorbisFile::OvRead ( LSS_OV_FILE _povfFile,
LSCHAR *  _pcBuffer,
LSINT32  _i32Length,
LSINT32  _i32BigEndianP,
LSINT32  _i32Word,
LSINT32  _i32Signed,
LSINT32 *  _pi32BitStream 
) [static]

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, OvRead() will not fill it; the passed in buffer size is treated as a limit and not a request. The output channels are in stream order and not remapped. Vorbis I defines channel order as follows: one channel - the stream is monophonic two channels - the stream is stereo. channel order: left, right three channels - the stream is a 1d-surround encoding. channel order: left, center, right four channels - the stream is quadraphonic surround. channel order: front left, front right, rear left, rear right five channels - the stream is five-channel surround. channel order: front left, center, front right, rear left, rear right six channels - the stream is 5.1 surround. channel order: front left, center, front right, rear left, rear right, LFE seven channels - the stream is 6.1 surround. channel order: front left, center, front right, side left, side right, rear center, LFE eight channels - the stream is 7.1 surround. channel order: front left, center, front right, side left, side right, rear left, rear right, LFE greater than eight channels - channel use and order is undefined 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 _pi32BitStream sections do not necessarily use the same number of channels or sampling rate. OvRead() passes back the index of the sequential logical bitstream currently being decoded (in *_pi32BitStream) 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 _pi32BitStream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_pcBufferA pointer to an output buffer. The decoded output is inserted into this buffer.
_i32LengthNumber of bytes to be read into the _pcBuffer. Should be the same size as the _pcBuffer. A typical value is 4096.
_i32BigEndianPSpecifies big or little endian byte packing. 0 for little endian, 1 for big endian. Typical value is 0.
_i32WordSpecifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2.
_i32SignedSigned or unsigned data. 0 for unsigned, 1 for signed. Typically 1.
_pi32BitStreamA pointer to the number of the current logical bitstream.
Returns:
OV_HOLE: indicates there was an interruption in the data. (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page). OV_EBADLINK: indicates that an invalid stream section was supplied to libvorbisfile, or the requested link is corrupt. OV_EINVAL: indicates the initial file headers couldn't be read or are corrupt, or that the initial open call for _povfFile failed. 0: indicates EOF. n: indicates actual number of samples read. OvReadFloat() will decode at most one vorbis packet per invocation, so the value returned will generally be less than _i32Length.
static LSINT32 lss::CVorbisFile::OvReadFilter ( LSS_OV_FILE _povfFile,
LSCHAR *  _pcBuffer,
LSINT32  _i32Length,
LSINT32  _i32BigEndianP,
LSINT32  _i32Word,
LSINT32  _i32Signed,
LSINT32 *  _pi32BitStream,
LSVOID(*)(LSFLOAT **_ppPcm, LSINT32 _i32Channels, LSINT32 _i32Samples, LSVOID *_pvFilterParam)  _pfFilter,
LSVOID *  _pvFilterParam 
) [static]

OvReadFilter() is a variant of OvRead(), the main function used to decode a Vorbis file within a loop. It passes the decoded floating point PCM data to the filter specified in the function arguments before converting the data to integer output samples. All other aspects of its behavior are as with OvRead().

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_pcBufferA pointer to an output buffer. The decoded output is inserted into this buffer.
_i32LengthNumber of bytes to be read into the _pcBuffer. Should be the same size as the _pcBuffer. A typical value is 4096.
_i32BigEndianPSpecifies big or little endian byte packing. 0 for little endian, 1 for big endian. Typical value is 0.
_i32WordSpecifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2.
_i32SignedSigned or unsigned data. 0 for unsigned, 1 for signed. Typically 1.
_pi32BitStreamA pointer to the number of the current logical bitstream.
_pfFilterFilter function to process float PCM data prior to conversion to interleaved integer output.
_pvFilterParamData to pass through to the filter function.
Returns:
OV_HOLE: indicates there was an interruption in the data. (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page). OV_EBADLINK: indicates that an invalid stream section was supplied to libvorbisfile, or the requested link is corrupt. OV_EINVAL: indicates the initial file headers couldn't be read or are corrupt, or that the initial open call for _povfFile failed. 0: indicates EOF. n: indicates actual number of samples read. OvReadFloat() will decode at most one vorbis packet per invocation, so the value returned will generally be less than _i32Length.
static LSINT32 lss::CVorbisFile::OvReadFloat ( LSS_OV_FILE _povfFile,
LSFLOAT ***  _pppfPcmChannels,
LSINT32  _i32Samples,
LSINT32 *  _pi32BitStream 
) [static]

This is the function used to decode a Vorbis file within a loop, but returns samples in native float format instead of in integer formats. For information on channel ordering and how OvReadFloat() deals with the complex issues of chaining, etc, refer to the documentation for OvRead().

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible vorbisfile functions.
_pppfPcmChannelsA pointer to an output buffer. The pointer will be set to the decoded output buffer.
_i32SamplesMaximum number of decoded _i32Samples to produce.
_pi32BitStreamA pointer to the number of the current logical bitstream.
Returns:
OV_HOLE: indicates there was an interruption in the data. (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page). OV_EBADLINK: indicates that an invalid stream section was supplied to libvorbisfile, or the requested link is corrupt. OV_EINVAL: indicates the initial file headers couldn't be read or are corrupt, or that the initial open call for _povfFile failed. 0: indicates EOF. n: indicates actual number of samples read. OvReadFloat() will decode at most one vorbis packet per invocation, so the value returned will generally be less than length.
static LSINT32 lss::CVorbisFile::OvSeekable ( LSS_OV_FILE _povfFile) [static]

This indicates whether or not the bitstream is seekable.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
0 indicates that the file is not seekable. nonzero indicates that the file is seekable.
static LSINT32 lss::CVorbisFile::OvSeekHelper ( LSS_OV_FILE _povfFile,
LSINT64  _i64Offset 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_povfFileUndocumented parameter from the Vorbis library.
_i64OffsetUndocumented parameter from the Vorbis library.
Returns:
Undocumented return from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvSerialNumber ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

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

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink 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.
Returns:
-1 if the specified logical bitstream _i32I does not exist. Returns the serial number of the logical bitstream _i32I or the serial number of the current bitstream if the file is nonseekable.
static LSVOID lss::CVorbisFile::OvSplice ( LSFLOAT **  _ppfPcm,
LSFLOAT **  _ppfLapPcm,
LSINT32  _i32N1,
LSINT32  _i32N2,
LSINT32  _i32Ch1,
LSINT32  _i32Ch2,
LSFLOAT *  _pfW1,
LSFLOAT *  _pfW2 
) [static, protected]

Undocumented function from the Vorbis library.

Parameters:
_ppfPcmUndocumented parameter from the Vorbis library.
_ppfLapPcmUndocumented parameter from the Vorbis library.
_i32N1Undocumented parameter from the Vorbis library.
_i32N2Undocumented parameter from the Vorbis library.
_i32Ch1Undocumented parameter from the Vorbis library.
_i32Ch2Undocumented parameter from the Vorbis library.
_pfW1Undocumented parameter from the Vorbis library.
_pfW2Undocumented parameter from the Vorbis library.
static LSINT32 lss::CVorbisFile::OvStreams ( LSS_OV_FILE _povfFile) [static]

Returns the number of logical bitstreams within our physical bitstream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
1 indicates a single logical bitstream or an unseekable file. n indicates the number of logical bitstreams.
static LSINT32 lss::CVorbisFile::OvTestCallbacks ( LSVOID *  _pvDataSource,
LSS_OV_FILE _povfFile,
const LSCHAR *  _pcInitial,
LSINT32  _i32BytesI,
LSS_OV_CALLBACKS  _ocCallbacks 
) [static]

This partially opens a vorbis file to test for Vorbis-ness. It loads the headers for the first chain and tests for seekability (but does not seek). Use OvTestOpen() to finish opening the file or OvClear to close/free it. WARNING for Windows developers: Do not use OvTest() in Windows applications; Windows linking places restrictions on passing FILE * handles successfully, and OvTest() runs afoul of these restrictions [a] in exactly the same way as OvOpen(). See the OvTestCallbacks() page for details on using OvTestCallbacks() instead.

Parameters:
_pfFileFile pointer to an already opened file or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
_pcInitialTypically 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read.
_i32BytesITypically set to 0. This parameter is useful if some data has already been read from the file and the stream is not seekable. In this case, _i32BytesI should contain the length (in bytes) of the buffer. Used together with _pcInitial.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption. This is an alternative function used to open and test an LSS_OV_FILE structure when using a data source other than a file, when its necessary to modify default file access behavior, or to test for Vorbis content from a FILE * pointer under Windows where OvTest() cannot be used. It allows the application to specify custom file manipulation routines and sets up all the related decoding structures. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
Parameters:
_pvDataSourceFile pointer to an already opened file or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream).
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
_pcInitialTypically 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read.
_i32BytesITypically set to 0. This parameter is useful if some data has already been read from the file and the stream is not seekable. In this case, _i32BytesI should contain the length (in bytes) of the buffer. Used together with _pcInitial.
_ocCallbacksA completed LSS_OV_CALLBACKS struct which indicates desired custom file manipulation routines. vorbisfile.h defines several preprovided callback sets; see LSS_OV_CALLBACKS for details.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvTestOpen ( LSS_OV_FILE _povfFile) [static]

Finish opening a file partially opened with OvTest() or OvTestCallbacks().

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same LSS_OV_FILE struct should be passed to all the libvorbisfile functions.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvTimeSeek ( LSS_OV_FILE _povfFile,
LSDOUBLE  _dPos 
) [static]

For seekable 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 OvRead() and get data from the newly seeked to position. This function does not work for unseekable streams.

Parameters:
_povfFilePointer to our already opened and initialized LSS_OV_FILE structure.
_dPosLocation to seek to within the file, specified in seconds.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvTimeSeekLap ( LSS_OV_FILE _povfFile,
LSDOUBLE  _dPos 
) [static]

For seekable streams, OvTimeSeekLap() seeks to the given time. This variant of OvTimeSeek() also automatically crosslaps the transition from the previous playback position into the new playback position in order to eliminate clicking and boundary discontinuities. Otherwise, usage and behavior is identical to OvTimeSeek(). OvTimeSeekLap() also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. OvTimeSeekLap() will lap between logical stream links of differing numbers of channels. Any extra channels from the origin of the seek are ignored; playback of these channels simply ends. Extra channels at the destination are lapped from silence. OvTimeSeekLap() will also lap between logical stream links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly. This function does not work for unseekable streams.

Parameters:
_povfFileDESC
_dPosDESC
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvTimeSeekPage ( LSS_OV_FILE _povfFile,
LSDOUBLE  _dPos 
) [static]

For seekable streams, this seeks to closest full page preceding the given time. This function is faster than OvTimeSeek() because it doesn't seek through the last few samples to reach an exact time, but it is also less accurate. This should be used when speed is important. This function also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. This function does not work for unseekable streams.

Parameters:
_povfFilePointer to our already opened and initialized LSS_OV_FILE structure.
_dPosLocation to seek to within the file, specified in seconds.
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSINT32 lss::CVorbisFile::OvTimeSeekPageLap ( LSS_OV_FILE _povfFile,
LSDOUBLE  _dPos 
) [static]

For seekable streams, OvTimeSeekPageLap() seeks to the closest full page preceeding the given time. This variant of OvTimeSeekPage also automatically crosslaps the transition from the previous playback position into the new playback position in order to eliminate clicking and boundary discontinuities. Otherwise, usage and behavior is identical to OvTimeSeekPage. OvTimeSeekPageLap() is faster than OvTimeSeekLap() because it doesn't seek through the last few samples to reach an exact time, but it is also less accurate. This should be used when speed is important, but crosslapping is still desired. OvTimeSeekPageLap() also updates everything needed within the decoder, so you can immediately call OvRead() and get data from the newly seeked to position. OvTimeSeekPageLap() will lap between logical stream links of differing numbers of channels. Any extra channels from the origin of the seek are ignored; playback of these channels simply ends. Extra channels at the destination are lapped from silence. OvTimeSeekPageLap() will also lap between logical stream links of differing sample rates. In this case, the sample rates are ignored (no implicit resampling is done to match playback). It is up to the application developer to decide if this behavior makes any sense in a given context; in practical use, these default behaviors perform sensibly. This function does not work for unseekable streams.

Parameters:
_povfFileDESC
_dPosDESC
Returns:
Returns 0 for success. OV_EREAD - A read from media returned an error. OV_ENOTVORBIS - Bitstream does not contain any Vorbis data. OV_EVERSION - Vorbis version mismatch. OV_EBADHEADER - Invalid Vorbis bitstream header. OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
static LSDOUBLE lss::CVorbisFile::OvTimeTell ( LSS_OV_FILE _povfFile) [static]

Returns the current decoding offset in seconds.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
Returns:
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.
static LSDOUBLE lss::CVorbisFile::OvTimeTotal ( LSS_OV_FILE _povfFile,
LSINT32  _i32I 
) [static]

Returns the total time in seconds of the physical bitstream or a specified logical bitstream.

Parameters:
_povfFileA pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions.
_i32ILink to the desired logical bitstream. To retrieve the time total for the entire physical bitstream, this parameter should be set to -1.
Returns:
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 seconds of content if _i32I=-1. n length in seconds of logical bitstream if _i32I=0 to n.
static LSUINTPTR lss::CVorbisFile::ReadFunc ( LSVOID *  _pvPtr,
LSUINTPTR  _uiptrSize,
LSUINTPTR  _uiptrNMemb,
LSVOID *  _pvDataSource 
) [static, protected]

Our custom read function.

Parameters:
_pvPtrLocation to store the read data.
_uiptrSizeSize of the elements to read.
_uiptrNMembNumber of elements to read.
_pvDataSourceFile handle.
Returns:
Returns the number of bytes read.
static LSINT32 lss::CVorbisFile::SeekFunc ( LSVOID *  _pvDataSource,
LSINT64  _i64Offset,
LSINT32  _i32Whence 
) [static, protected]

Our custom seek function.

Parameters:
_pvDataSourceFile handle.
_i64OffsetAmount to seek.
_i32WhenceStarting point.
Returns:
Returns 0 on success, -1 on failure.
static LSINT64 lss::CVorbisFile::TellFunc ( LSVOID *  _pvDataSource) [static, protected]

Our custom tell function.

Parameters:
_pvDataSourceFile handle.
Returns:
Returns the position of the file pointer or -1.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator