"L. Spiro Engine"
|
Convenience library for opening/seeking/decoding. More...
#include <LSSVorbisFile.h>
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_info * | OvInfo (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) |
Convenience library for opening/seeking/decoding.
Class CVorbisFile Description: Convenience library for opening/seeking/decoding.
typedef struct lss::CVorbisFile::LSS_OV_CALLBACKS * lss::CVorbisFile::LPLSS_OV_CALLBACKS |
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].
typedef struct lss::CVorbisFile::LSS_OV_FILE * lss::CVorbisFile::LPLSS_OV_FILE |
Ogg file data.
static LSINT32 lss::CVorbisFile::CloseFunc | ( | LSVOID * | _pvDataSource | ) | [static, protected] |
Our custom close function.
_pvDataSource | File handle to close. |
static LSUINT64 LSE_CALL lss::CVorbisFile::GetPcmCount | ( | LSS_OV_FILE & | _ovfFile | ) | [static] |
Returns the actual number of PCM's in the given file.
_ovfFile | The file whose PCM count is to be obtained. |
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.
_pcFile | The file to load. |
_pui8Data | Pointer filled with the file data allocated with _paAllocator. |
_ui32Length | Length of the wave data in bytes. |
_ui32Freq | Frequency of the wave data. |
_ui32Bits | Bits per sample of the wave data. |
_ui32Channels | Channels in the wave data. |
_paAllocator | Allocator used to allocate _pui8Data, or NULL to use LSENEW. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i64Pos | Position in pcm samples to seek to in the bitstream. |
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.
_povfFile | Undocumented parameter from the Vorbis library. |
_i64Pos | Undocumented parameter from the Vorbis library. |
_pfLocalSeek | Undocumented parameter 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.
_popOg | Undocumented parameter from the Vorbis library. |
_ppi32SerialNoList | Undocumented parameter from the Vorbis library. |
_pi32N | Undocumented 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_i64Begin | Undocumented parameter from the Vorbis library. |
_i64Searched | Undocumented parameter from the Vorbis library. |
_i64End | Undocumented parameter from the Vorbis library. |
_i64EndGran | Undocumented parameter from the Vorbis library. |
_i32EndSerial | Undocumented parameter from the Vorbis library. |
_pi32CurrentNoList | Undocumented parameter from the Vorbis library. |
_i32CurrentNoS | Undocumented parameter from the Vorbis library. |
_i32M | Undocumented parameter 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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | 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. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
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().
_povfFile | A 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(). |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | 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. |
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.
_povfFile1 | A pointer to the LSS_OV_FILE structure representing the origin stream from which to transition playback. |
_povfFile2 | A pointer to the LSS_OV_FILE structure representing the stream with which playback continues. |
static LSVOID lss::CVorbisFile::OvDecodeClear | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_dPos | Undocumented parameter from the Vorbis library. |
_pfLocalSeek | Undocumented parameter 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_popOpIn | Undocumented parameter from the Vorbis library. |
_i32ReadP | Undocumented parameter from the Vorbis library. |
_i32SpanP | Undocumented parameter 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_pviVi | Undocumented parameter from the Vorbis library. |
_pvcVc | Undocumented parameter from the Vorbis library. |
_ppi32SerialNoList | Undocumented parameter from the Vorbis library. |
_pi32SerialNoN | Undocumented parameter from the Vorbis library. |
_popOgPtr | Undocumented parameter 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.
_pcPath | Null terminated string containing a file _pcPath suitable for passing to fopen(). |
_povfFile | 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. |
static LSINT32 lss::CVorbisFile::OvGetData | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_pviInfo | Undocumented parameter from the Vorbis library. |
_pvdsVd | Undocumented parameter from the Vorbis library. |
_ppfLapPcm | Undocumented parameter from the Vorbis library. |
_i32LapSize | Undocumented 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_popOg | Undocumented parameter from the Vorbis library. |
_i64Boundary | Undocumented parameter 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_popPage | Undocumented parameter 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.
_povfFile | Undocumented parameter from the Vorbis library. |
_pi32SerialList | Undocumented parameter from the Vorbis library. |
_i32SerialCount | Undocumented parameter from the Vorbis library. |
_pi32SerialNo | Undocumented parameter from the Vorbis library. |
_pi64GranPos | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvHalfRate | ( | LSS_OV_FILE * | _povfFile, |
LSINT32 | _i32Flag | ||
) | [static] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter from the Vorbis library. |
_i32Flag | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvHalfRateP | ( | LSS_OV_FILE * | _povfFile | ) | [static] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvHostIsBigEndian | ( | ) | [static, protected] |
Undocumented function 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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | 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. |
static LSINT64 lss::CVorbisFile::OvInitialPcmOffset | ( | LSS_OV_FILE * | _povfFile, |
CVorbisCodec::vorbis_info * | _pviInfo | ||
) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter from the Vorbis library. |
_pviInfo | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvInitPrime | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvInitSet | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter 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.
_popOg | Undocumented parameter from the Vorbis library. |
_pi32SerialNoList | Undocumented parameter from the Vorbis library. |
_i32N | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvLookUpSerialNo | ( | LSINT32 | _i32S, |
LSINT32 * | _pi32SerialNoList, | ||
LSINT32 | _i32N | ||
) | [static, protected] |
Undocumented function from the Vorbis library.
_i32S | Undocumented parameter from the Vorbis library. |
_pi32SerialNoList | Undocumented parameter from the Vorbis library. |
_i32N | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvMakeDecodeReady | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter 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.
_pfFile | Undocumented parameter from the Vorbis library. |
_i64Off | Undocumented parameter from the Vorbis library. |
_i32Whence | Undocumented parameter from the Vorbis library. |
_pvFile | Undocumented parameter from the Vorbis library. |
_povfFile | Undocumented parameter from the Vorbis library. |
_pcInitial | Undocumented parameter from the Vorbis library. |
_i32BytesI | Undocumented parameter from the Vorbis library. |
_ocCallbacks | Undocumented parameter from the Vorbis library. |
static LSINT32 lss::CVorbisFile::OvOpen2 | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter 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.
_pfFile | 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 | 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. |
_pcInitial | 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read. |
_i32BytesI | Typically 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. |
_pvDataSource | Pointer to a data structure allocated by the calling application, containing any state needed by the _ocCallbacks provided. |
_povfFile | 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. |
_pcInitial | Typically 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. |
_i32BytesI | Typically 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. |
_ocCallbacks | A 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. |
static LSINT32 lss::CVorbisFile::OvOpenSeekable2 | ( | LSS_OV_FILE * | _povfFile | ) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter 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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i64Pos | Position in pcm samples to seek to in the bitstream. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i64Pos | Position in pcm samples to seek to in the bitstream. |
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.
_povfFile | DESC |
_i64Pos | DESC |
static LSINT64 lss::CVorbisFile::OvPcmTell | ( | LSS_OV_FILE * | _povfFile | ) | [static] |
Returns the current offset in samples.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | Link to the desired logical bitstream. To retrieve the total pcm samples for the entire physical bitstream, this parameter should be set to -1. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i64Pos | Position in compressed bytes to seek to in the bitstream. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i64Pos | Position in compressed bytes to seek to in the bitstream. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | Link to the desired logical bitstream. To retrieve the total bytes for the entire physical bitstream, this parameter should be set to -1. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_pcBuffer | A pointer to an output buffer. The decoded output is inserted into this buffer. |
_i32Length | Number of bytes to be read into the _pcBuffer. Should be the same size as the _pcBuffer. A typical value is 4096. |
_i32BigEndianP | Specifies big or little endian byte packing. 0 for little endian, 1 for big endian. Typical value is 0. |
_i32Word | Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2. |
_i32Signed | Signed or unsigned data. 0 for unsigned, 1 for signed. Typically 1. |
_pi32BitStream | A pointer to the number of the current logical bitstream. |
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().
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_pcBuffer | A pointer to an output buffer. The decoded output is inserted into this buffer. |
_i32Length | Number of bytes to be read into the _pcBuffer. Should be the same size as the _pcBuffer. A typical value is 4096. |
_i32BigEndianP | Specifies big or little endian byte packing. 0 for little endian, 1 for big endian. Typical value is 0. |
_i32Word | Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2. |
_i32Signed | Signed or unsigned data. 0 for unsigned, 1 for signed. Typically 1. |
_pi32BitStream | A pointer to the number of the current logical bitstream. |
_pfFilter | Filter function to process float PCM data prior to conversion to interleaved integer output. |
_pvFilterParam | Data to pass through to the filter function. |
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().
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible vorbisfile functions. |
_pppfPcmChannels | A pointer to an output buffer. The pointer will be set to the decoded output buffer. |
_i32Samples | Maximum number of decoded _i32Samples to produce. |
_pi32BitStream | A pointer to the number of the current logical bitstream. |
static LSINT32 lss::CVorbisFile::OvSeekable | ( | LSS_OV_FILE * | _povfFile | ) | [static] |
This indicates whether or not the bitstream is seekable.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
static LSINT32 lss::CVorbisFile::OvSeekHelper | ( | LSS_OV_FILE * | _povfFile, |
LSINT64 | _i64Offset | ||
) | [static, protected] |
Undocumented function from the Vorbis library.
_povfFile | Undocumented parameter from the Vorbis library. |
_i64Offset | Undocumented parameter 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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | 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. |
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.
_ppfPcm | Undocumented parameter from the Vorbis library. |
_ppfLapPcm | Undocumented parameter from the Vorbis library. |
_i32N1 | Undocumented parameter from the Vorbis library. |
_i32N2 | Undocumented parameter from the Vorbis library. |
_i32Ch1 | Undocumented parameter from the Vorbis library. |
_i32Ch2 | Undocumented parameter from the Vorbis library. |
_pfW1 | Undocumented parameter from the Vorbis library. |
_pfW2 | Undocumented 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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
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.
_pfFile | 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 | 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. |
_pcInitial | 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read. |
_i32BytesI | Typically 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. |
_pvDataSource | 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 | 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. |
_pcInitial | 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 _i32BytesI. In this case, _pcInitial should be a pointer to a buffer containing the data read. |
_i32BytesI | Typically 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. |
_ocCallbacks | A 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. |
static LSINT32 lss::CVorbisFile::OvTestOpen | ( | LSS_OV_FILE * | _povfFile | ) | [static] |
Finish opening a file partially opened with OvTest() or OvTestCallbacks().
_povfFile | 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. |
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.
_povfFile | Pointer to our already opened and initialized LSS_OV_FILE structure. |
_dPos | Location to seek to within the file, specified in seconds. |
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.
_povfFile | DESC |
_dPos | DESC |
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.
_povfFile | Pointer to our already opened and initialized LSS_OV_FILE structure. |
_dPos | Location to seek to within the file, specified in seconds. |
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.
_povfFile | DESC |
_dPos | DESC |
static LSDOUBLE lss::CVorbisFile::OvTimeTell | ( | LSS_OV_FILE * | _povfFile | ) | [static] |
Returns the current decoding offset in seconds.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
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.
_povfFile | A pointer to the LSS_OV_FILE structure--this is used for ALL the externally visible libvorbisfile functions. |
_i32I | Link to the desired logical bitstream. To retrieve the time total for the entire physical bitstream, this parameter should be set to -1. |
static LSUINTPTR lss::CVorbisFile::ReadFunc | ( | LSVOID * | _pvPtr, |
LSUINTPTR | _uiptrSize, | ||
LSUINTPTR | _uiptrNMemb, | ||
LSVOID * | _pvDataSource | ||
) | [static, protected] |
Our custom read function.
_pvPtr | Location to store the read data. |
_uiptrSize | Size of the elements to read. |
_uiptrNMemb | Number of elements to read. |
_pvDataSource | File handle. |
static LSINT32 lss::CVorbisFile::SeekFunc | ( | LSVOID * | _pvDataSource, |
LSINT64 | _i64Offset, | ||
LSINT32 | _i32Whence | ||
) | [static, protected] |
Our custom seek function.
_pvDataSource | File handle. |
_i64Offset | Amount to seek. |
_i32Whence | Starting point. |
static LSINT64 lss::CVorbisFile::TellFunc | ( | LSVOID * | _pvDataSource | ) | [static, protected] |
Our custom tell function.
_pvDataSource | File handle. |