[Openal] Get current volume for a source

Jason Daly jdaly at ist.ucf.edu
Mon Jun 8 17:30:09 PDT 2009


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"



More information about the Openal mailing list