[Openal] Difference between pausing and stopping?
Garin Hiebert
garinh at cheesetoast.net
Mon Oct 16 13:09:50 PDT 2006
Nolan Darilek wrote:
> Is there a difference between what happens when a source is paused or
> stopped, other than the AL_SOURCE_STATE being set differently?
>
> In my higher-level layer, I'm thinking of making pausing stop the
> source and preserve the current playing location, while stop performs
> a rewind after. Is there any disadvantage to using alSourceStop() in
> both instances?
The difference is as you describe -- calling alSourcePlay after pausing
will resume from the position the source was when it was paused and
calling alSourcePlay after stopping will resume from the beginning of
the buffer(s).
There's no inherent performance or resource advantage to using stop/set
offset/play over pause/play -- so don't hesitate to do things the way
that seems most appropriate for your audio engine.
Garin
More information about the Openal
mailing list