[Ardour-Dev] Time wraparound because of nframes_t = uint32_t

Paul Davis paul at linuxaudiosystems.com
Tue Jan 27 06:32:02 PST 2009


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.

it is still not clear in my mind whether we will change JACK or override
it.

--p





More information about the Ardour-Dev mailing list