[Openal-devel] AL_MSEC_OFFSET
Jason Daly
jdaly at ist.ucf.edu
Fri Apr 29 08:46:37 PDT 2005
>> 1. Perhaps restrict the signature of AL_MSEC_OFFSET from "i,f" to
>> just "f"?
>> AL_SAMPLE_OFFSET and AL_BYTE_OFFSET are of course naturally integers
>> but AL_MSEC_OFFSET is more naturally a float (especially since sample
>> rate is not guaranteed to be a multiple of 1000 Hz).
>
Since things like AL_MAX_DISTANCE and AL_PITCH are also restricted to
"f", this makes sense. I think it would be convenient to allow an
integer version as well (which is then converted to a float), but
consistency is more important.
>>
>> 2. Change AL_MSEC_OFFSET to AL_SEC_OFFSET (or, even better, just call
>> it AL_TIME_OFFSET) and have the time expressed in seconds instead of
>> milliseconds. I think it is nicer to have a uniform time unit for
>> everything. Also, having time expressed in seconds would be more
>> useful than milliseconds in calculations since frequency is already
>> expressed in Hz.
>
This makes sense to me. Aside from the uniformity that Alexandre
mentioned, if we're going to allow fractions of a unit to be specified,
then we should use the basic unit (seconds). As far as the name (TIME
vs. SEC), I could go either way.
--
--"J"
"I'm a castaway stranded in a desolate land,
I can see the footprints in the virtual sand."
--Neil Peart
More information about the Openal-devel
mailing list