Cleanup
[carla.git] / source / includes / clap / fixedpoint.h
blobfb042d3a6f62de5a2332fbe98a8ed7492f44ff5d
1 #pragma once
3 #include "private/std.h"
4 #include "private/macros.h"
6 /// We use fixed point representation of beat time and seconds time
7 /// Usage:
8 /// double x = ...; // in beats
9 /// clap_beattime y = round(CLAP_BEATTIME_FACTOR * x);
11 // This will never change
12 static const CLAP_CONSTEXPR int64_t CLAP_BEATTIME_FACTOR = 1LL << 31;
13 static const CLAP_CONSTEXPR int64_t CLAP_SECTIME_FACTOR = 1LL << 31;
15 typedef int64_t clap_beattime;
16 typedef int64_t clap_sectime;