[SDL] Audio API to get / set audio position

Drake Wilson drake at begriffli.ch
Sun Dec 5 17:56:40 PST 2010


Quoth hce <webmail.hce at gmail.com>, on 2010-12-06 11:51:14 +1100:
> I can only find APIs to play / pause audio, but no APIs to get / set
> audio position which can be used to run forward / backward audio from
> an application. Am I missing something here?

I assume you're talking about the SDL 1.2 core audio API.

You provide a stream of samples.  Once you have provided the samples
they are played.  It's one-way; you can't magically get back the audio
from seven seconds ago out of the sound card.  If you need to seek
forward and backward in a preëxisting waveform then you have to do it
separately, which can include implementing it yourself or using other
libraries such as SDL_mixer that are designed for more abstract audio
functions.

   ---> Drake Wilson



More information about the SDL mailing list