Chris@1: Chris@1: Chris@1: Chris@1: Vorbisfile - function - ov_crosslap Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

Chris@1: Chris@1:

ov_crosslap()

Chris@1: Chris@1:

declared in "vorbis/vorbisfile.h";

Chris@1: Chris@1:

ov_crosslap overlaps and blends the boundary at a transition Chris@1: between two separate streams represented by separate OggVorbis_File structures. For lapping Chris@1: transitions due to seeking within a single stream represented by a Chris@1: single OggVorbis_File structure, Chris@1: consider using the lapping versions of the vorbisfile seeking functions instead. Chris@1: Chris@1:

ov_crosslap is used between the last (usually ov_read) call on Chris@1: the old stream and the first ov_read from the new stream. Any Chris@1: desired positioning of the new stream must occur before the call to Chris@1: ov_crosslap() as a seek dumps all prior lapping information from a Chris@1: stream's decode state. Crosslapping does not introduce or remove any Chris@1: extraneous samples; positioning works exactly as if ov_crosslap was not Chris@1: called. Chris@1: Chris@1:

ov_crosslap will lap between streams of differing numbers of Chris@1: channels. Any extra channels from the old stream are ignored; playback Chris@1: of these channels simply ends. Extra channels in the new stream are Chris@1: lapped from silence. ov_crosslap will also lap between streams links Chris@1: of differing sample rates. In this case, the sample rates are ignored Chris@1: (no implicit resampling is done to match playback). It is up to the Chris@1: application developer to decide if this behavior makes any sense in a Chris@1: given context; in practical use, these default behaviors perform Chris@1: sensibly. Chris@1: Chris@1:

Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
Chris@1:

Chris@1: long ov_crosslap(OggVorbis_File *old, OggVorbis_File *new);
Chris@1: 
Chris@1: 
Chris@1:
Chris@1: Chris@1:

Parameters

Chris@1:
Chris@1:
old
Chris@1:
A pointer to the OggVorbis_File structure representing the origin stream from which to transition playback.
Chris@1: Chris@1:
new
Chris@1:
A pointer to the OggVorbis_File structure representing the stream with which playback continues.
Chris@1:
Chris@1: Chris@1: Chris@1:

Return Values

Chris@1:
Chris@1:
Chris@1:
OV_EINVAL
Chris@1:
crosslap called with an OggVorbis_File structure that isn't open.
Chris@1:
OV_EFAULT
Chris@1:
internal error; implies a library bug or external heap corruption.
Chris@1:
OV_EREAD
Chris@1:
A read from media returned an error.
Chris@1:
OV_EOF
Chris@1:
indicates stream vf2 is at end of file, or that vf1 is at end of file immediately after a seek (making crosslap impossible as there's no preceding decode state to crosslap).
Chris@1:
0
Chris@1:
success.
Chris@1:
Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1:

Chris@1:
Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

copyright © 2000-2010 Xiph.Org

Ogg Vorbis

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

Chris@1: Chris@1: Chris@1: Chris@1: