[openal] Synchronizing 3D sources
chris.kcat at gmail.com
Mon Jan 27 13:43:31 EST 2014
On 01/27/2014 09:24 AM, Doug Binks wrote:
> AL_SAMPLE_OFFSET_DEVICE_CLOCK_SOFT returns source offset, output
> sample count, output frequency, and output update size.
> AL_SAMPLE_OFFSET_LATENCY_DEVICE_CLOCK_SOFT returns source offset in
> 32.32 format as per AL_SAMPLE_OFFSET_LATENCY along with latency,
> output sample count, output frequency and output update size.
It shouldn't be necessary to return the output frequency here. Returning
the output sample count and output update size as a micro- or nanosecond
time value removes the need for it. It also makes more sense for the
update time to be a separate device-level (alcGetIntegerv) query... it's
a relatively non-volatile value that doesn't need to be retrieved with
the others, as it can only change during alcCreateContext.
> These should be sufficient for deciding when to play a source with the
> new (not implemented yet) AL_PLAY_ON_DEVICE_CLOCK_SOFT timing.
I think functions would be better than a property.
void alSourcePlayTimeSOFT(ALuint64SOFT time, ALuint id);
void alSourcePlayTimevSOFT(ALuint64SOFT time, ALsizei count,
const ALuint *ids);
This makes more sense to me, for the same reason you'd use alSourcePlay
instead of setting the AL_SOURCE_STATE property to AL_PLAYING.
More information about the openal