comparison DPF-Prymula-audioplugins/dpf/distrho/src/clap/fixedpoint.h @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 #pragma once
2
3 #include "private/std.h"
4 #include "private/macros.h"
5
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);
10
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;
14
15 typedef int64_t clap_beattime;
16 typedef int64_t clap_sectime;