On Saturday 09 May 2009 8:57:38 pm bpazolli wrote:
> Hey, I am trying to switch buffer data dynamically (i.e. during program
> execution). I tried just using an alBufferData command to link new data to
> the existing buffer; that didn't work. I then tried deleting the buffer &
> source using their respective alDelete commands and then building new ones
> with the new buffer date; that didn't work. So I am at a loss as to how I
> can actually switch. Do I have to stop playback or some other step? I don't
> know.
Yes, you have to stop the source. If you want to modify/delete a buffer, it
has to be detached from the source (call alSourcei(source, AL_BUFFER, 0); on
all sources it's currently set on), which can only be done when the source is
stopped. You can also just set a different buffer on the source (which
implicitly detaches the previous buffer), while it's stopped.
_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal