Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
types.h File Reference

Custom types. More...

#include "zrythm-config.h"
#include <chrono>
#include <cinttypes>
#include <cstdint>
#include <filesystem>
#include <QtTypes>
#include <magic_enum_all.hpp>
Include dependency graph for types.h:

Go to the source code of this file.

Data Structures

struct  EngineProcessTimeInfo
 Common struct to pass around during processing to avoid repeating the data in function arguments. More...
 
struct  _GdkRGBA
 
struct  OptionalRef< T >
 Wrapper around std::optional<std::reference_wrapper<T>> that provides a more convenient API. More...
 

Macros

#define SIGNED_FRAME_FORMAT   PRId64
 
#define UNSIGNED_FRAME_FORMAT   PRIu64
 
#define ENUM_INT_TO_VALUE_CONST(_enum, _int)
 
#define ENUM_INT_TO_VALUE(_enum, _int)
 
#define ENUM_VALUE_TO_INT(_val)
 
#define ENUM_ENABLE_BITSET(_enum)
 
#define ENUM_BITSET(_enum, _val)
 
#define ENUM_BITSET_TEST(_val, _other_val)
 
#define ENUM_BITSET_TO_STRING(_enum, _val)
 
#define ENUM_COUNT(_enum)
 
#define ENUM_NAME(_val)
 
#define ENUM_NAME_FROM_INT(_enum, _int)
 
#define ASSUME(expr)
 
#define KEEP   __attribute__ ((used, retain, noinline))
 
#define ZRYTHM_IS_QT_THREAD   (QThread::currentThread () == qApp->thread ())
 
#define Z_DISABLE_COPY_MOVE(Class)
 
#define Z_DISABLE_COPY(Class)
 
#define Z_DISABLE_MOVE(Class)
 

Typedefs

using RtTimePoint = int64_t
 
using RtDuration = int64_t
 
using midi_byte_t = uint8_t
 MIDI byte.
 
using nframes_t = uint32_t
 Frame count.
 
using sample_rate_t = uint32_t
 Sample rate.
 
using midi_time_t = uint32_t
 MIDI time in global frames.
 
using channels_t = uint_fast8_t
 Number of channels.
 
using sample_t = float
 The sample type.
 
using bpm_t = float
 The BPM type.
 
using curviness_t = double
 
using signed_frame_t = int_fast64_t
 Signed type for frame index.
 
using unsigned_frame_t = uint_fast64_t
 Unsigned type for frame index.
 
using signed_ms_t = signed_frame_t
 Signed millisecond index.
 
using signed_sec_t = signed_frame_t
 Signed second index.
 
using ProcessId = qint64
 GPid equivalent.
 
using GenericFloatGetter = std::function<float ()>
 Getter prototype for float values.
 
using GenericFloatSetter = std::function<void (float)>
 Setter prototype for float values.
 
using GenericStringGetter = std::function<std::string ()>
 Getter prototype for strings.
 
using GenericStringSetter = std::function<void (const std::string &)>
 Setter prototype for float values.
 
using GenericCallback = std::function<void ()>
 Generic callback.
 
using GenericBoolGetter = std::function<bool ()>
 
typedef int(* GenericCmpFunc) (const void *a, const void *b)
 Generic comparator.
 
typedef void(* ObjectFreeFunc) (void *)
 Function to call to free objects.
 
using SteadyClock = std::chrono::steady_clock
 
using SteadyTimePoint = SteadyClock::time_point
 
using SteadyDuration = SteadyClock::duration
 
using GdkRGBA = _GdkRGBA
 
using SampleRateGetter = std::function<sample_rate_t ()>
 

Enumerations

enum class  AudioValueFormat { AudioValueFormat::Amplitude , AudioValueFormat::DBFS , AudioValueFormat::Fader }
 
enum class  BeatUnit { Two , Four , Eight , Sixteen }
 Beat unit. More...
 
enum class  CacheType { PluginPorts = 1 << 1 , PlaybackSnapshots = 1 << 2 , AutomationLaneRecordModes = 1 << 3 , AutomationLanePorts = 1 << 4 }
 

Functions

constexpr size_t operator""_zu (unsigned long long int x)
 
template<typename Class, typename Ret, typename... Args, typename ActualClass>
requires std::is_base_of_v<Class, ActualClass>
auto bind_member_function (ActualClass &obj, Ret(Class::*func)(Args...))
 
 ENUM_ENABLE_BITSET (CacheType)
 
template<typename T>
std::string typename_to_string ()
 
template<typename Tuple, typename Callable>
void iterate_tuple (Callable c, Tuple &&t)
 

Variables

constexpr CacheType ALL_CACHE_TYPES
 
constexpr bool SourceFuncContinue = true
 
constexpr bool SourceFuncRemove = false
 

Detailed Description

Custom types.

Definition in file types.h.

Function Documentation

◆ operator""_zu()

size_t operator""_zu ( unsigned long long int x)
constexpr

Definition at line 43 of file types.h.