[Ardour-Dev] Time wraparound because of nframes_t = uint32_t
dave at drobilla.net
Tue Feb 17 09:55:07 PST 2009
On Tue, 2009-01-27 at 15:32 +0100, Paul Davis wrote:
> On Tue, 2009-01-27 at 21:29 +0700, Hans Baier wrote:
> > This is a fundamental problem in Ardour: the type of
> > time measurement (nframes_t is an uint32_t), ie. it is limited
> > to 32Bit values. Its maximal value is 2^32-1. Divide this by the
> > samplerate and by 60*60 and you get wraparound at 12,427567378 hours
> > which matches with your observation.
> > You could try to change libs/ardour/types.h:60
> > from
> > typedef uint32_t nframes_t;
> > to
> > typedef uint64_t nframes_t;
> please do not do this.
> we already have nframes64_t which is a *signed* 64 bit integer
> (signedness helps to avoid hairy bugs). the GUI already uses it more or
> less universally. the backend does not, because JACK uses an unsigned 32
> bit integer.
Assuming jack transport isn't being used, do we have to care?
We could change ardour's transport types to 64 bits. The range of a
session != the range of a single jack buffer, they are completely
different time bases anyway
More information about the Ardour-Dev