[Openal-devel] Determining Playback Position

Jason Daly jdaly at ist.ucf.edu
Fri Apr 25 16:12:28 PDT 2008


Bryan Perfetto wrote:
> Hi,
>
> Is there a way to determine the current playback position of a sound? 
> I am trying to use OpenAL to create a visualizer and based on the wave 
> form data and FFT data of the currently playing song, the display will 
> change. However, in order to do this I need to know the current 
> playback position of a sound. Is this possible?
>
> Any help would be great! Thanks!

I believe you can use

alGetIntegerv(sourceID, AL_SAMPLE_OFFSET, &offset);

(or AL_SEC_OFFSET, or AL_BYTE_OFFSET) to get this.


Check the spec for details (http://www.openal.org/documentation.html)


--"J"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal-devel/attachments/20080425/1846c787/attachment.html


More information about the Openal-devel mailing list