Subject: [linux-audio-dev] Problem and Solution: time
From: Roger Larsson (roger.larsson_AT_norran.net)
Date: la tammi 08 2000 - 19:08:47 EST
Problem: how to express time, sample frequency and no of samples?
Possible solution:
as a fraction of periods and sample frequency!
periods / Hz
both in 32 bit unsigned.
s / 1 = s in seconds, range of over 100 years (like current time
handling in Unixes)
n / f where
n = no of samples in specified frequency
f = frequency in HZ handles all sample frequencies up to 4 GHz ( < ns )
duration:
(td*f) / f where td is duration in seconds
with the maximum sample frequency the maximum duration is 1 s - ok
with 96 kHz the maximum duration is 12 hours - ok
with the minimum sample frequency (=1) the maximum duration is >100
years - ok
special:
1 / 0 = one constant
/RogerL
-- Home page: http://www.norran.net/nra02596/
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST