[openal] Synchronizing 3D sources

Chris Robinson chris.kcat at gmail.com
Mon Jan 27 19:19:30 EST 2014


On 01/27/2014 02:16 PM, Doug Binks wrote:
> * Output frequency - indeed I think this could disappear from the return as
> it's relatively non volatile. However I'd like to leave the option to get
> samples rather than time as it makes the code easier to use. Adding a get
> time rather than samples as per latency makes sense though for some cases.

It's possible to convert the clock time (and update time) back to sample 
count if needed (at microsecond resolution you should be able to convert 
back and forth just fine up to 500Khz, and nanosecond should handle up 
to 500Mhz). By having the clock in microseconds or nanoseconds, an app 
can also convert it directly to/from the source buffer's sample rate if 
it needs to, and avoid the device's rate altogether... you can largely 
ignore the fact that the device has a sample rate and just consider the 
sources individually.

> Please be as mean as you can with the code, even though it's just a
> prototype to show this can work. Meanwhile I'll look into the proposed
> changes and clean up the example a bit. I'm trying to stay away from using
> SDL for now to reduce dependencies with the example I wrote hence the
> slight repeat of code.

Aside from stuff already mentioned, in-progress extensions should have 
their tokens and things added to the private alMain.h instead of the 
public alext.h. The extension string should also use SOFTX instead of 
SOFT while it's being worked on and is subject to changes. And since it 
will probably be adding new device-level queries and methods (I imagine 
there will be a new alGetInteger64vSOFT function to get the device clock 
on its own), it should be an ALC extension.


More information about the openal mailing list