6#include "zrythm-config.h"
16#include <gsl-lite/gsl-lite.hpp>
18using namespace std::literals;
19namespace gsl = ::gsl_lite;
28using RtTimePoint = int64_t;
29using RtDuration = int64_t;
40using curviness_t = double;
82using GenericBoolGetter = std::function<bool ()>;
108using SteadyClock = std::chrono::steady_clock;
109using SteadyTimePoint = SteadyClock::time_point;
110using SteadyDuration = SteadyClock::duration;
112namespace fs = std::filesystem;
114#define ZRYTHM_IS_QT_THREAD (QThread::currentThread () == qApp->thread ())
120 return typeid (T).name ();
123#define Z_DISABLE_COPY_MOVE(Class) Q_DISABLE_COPY_MOVE (Class)
124#define Z_DISABLE_COPY(Class) Q_DISABLE_COPY (Class)
125#define Z_DISABLE_MOVE(Class) \
126 Class (Class &&) = delete; \
127 Class &operator= (Class &&) = delete;
129template <
typename Tuple,
typename Callable>
131iterate_tuple (Callable c, Tuple &&t)
133 std::apply ([&] (
auto &&... args) { (c (args), ...); }, t);
138using basic_enum_base_type_t = uint8_t;
std::function< float()> GenericFloatGetter
Getter prototype for float values.
uint_fast64_t unsigned_frame_t
Unsigned type for frame index.
std::function< void(float)> GenericFloatSetter
Setter prototype for float values.
std::function< std::string()> GenericStringGetter
Getter prototype for strings.
qint64 ProcessId
GPid equivalent.
float audio_sample_type_t
The sample type.
signed_frame_t signed_ms_t
Signed millisecond index.
signed_frame_t signed_sec_t
Signed second index.
uint_fast8_t channels_t
Number of channels.
std::function< void(const std::string &)> GenericStringSetter
Setter prototype for float values.
std::function< void()> GenericCallback
Generic callback.
int_fast64_t signed_frame_t
Signed type for frame index.
@ Fader
0 to 1, suitable for drawing.
@ Amplitude
0 to 2, amplitude.