[Openal] How to play source from a specific sample ofset
Jason Daly
jdaly at ist.ucf.edu
Tue May 20 07:50:28 PDT 2008
wassim_belhadj wrote:
> Dear list,
>
> I would like to know how to play source from a specific sample ofset ?
>
> For example, i would like to play sound(source) from a sample number
> 10000.
>
>
alSourcei(sourceID, AL_SAMPLE_OFFSET, 10000);
alSourcePlay(sourceID);
You can also use AL_BYTE_OFFSET, or AL_SEC_OFFSET (use alSourcef and a
floating point value for AL_SEC_OFFSET). Note that AL_SEC_OFFSET lets
you specify the offset in a way that doesn't depend on your source's
data format, frequency, or number of channels.
--"J"
More information about the Openal
mailing list