« Return to Thread: Get current volume for a source

Re: Get current volume for a source

by Jason Daly :: Rate this Message:

Reply to Author | View in Thread

The Big One wrote:
> One final question - I have not been able to find the query / function
> to grab the actual raw buffer data at a given point.

And you won't.  By design, there is no way to query buffer data from OpenAL.

OpenAL was designed to support hardware accelerated sound.  Once you
give the buffer data to OpenAL, it can do whatever it wants with it,
including converting it to a better format for whatever hardware is
running.  That data might reside in on-board memory, which would make it
practically impossible to return a meaningful value (by the time all the
DMA's and bus transfers were done, you'd be off by a few thousand samples).

This is why I said you have to keep your own copy of the buffer data.  
You can query the current source position, then look up the value at
that position in your own copy of the data.

--"J"

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Get current volume for a source