cannam@86: cannam@86: cannam@86: cannam@86: Vorbisfile - function - ov_crosslap cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

cannam@86: cannam@86:

ov_crosslap()

cannam@86: cannam@86:

declared in "vorbis/vorbisfile.h";

cannam@86: cannam@86:

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

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

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

cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:
cannam@86:

cannam@86: long ov_crosslap(OggVorbis_File *old, OggVorbis_File *new);
cannam@86: 
cannam@86: 
cannam@86:
cannam@86: cannam@86:

Parameters

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

Return Values

cannam@86:
cannam@86:
cannam@86:
OV_EINVAL
cannam@86:
crosslap called with an OggVorbis_File structure that isn't open.
cannam@86:
OV_EFAULT
cannam@86:
internal error; implies a library bug or external heap corruption.
cannam@86:
OV_EREAD
cannam@86:
A read from media returned an error.
cannam@86:
OV_EOF
cannam@86:
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).
cannam@86:
0
cannam@86:
success.
cannam@86:
cannam@86:
cannam@86: cannam@86: cannam@86: cannam@86:

cannam@86:
cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

copyright © 2000-2010 Xiph.Org

Ogg Vorbis

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

cannam@86: cannam@86: cannam@86: cannam@86: