Anklang-0.3.0.dev956+gd75ac925 anklang-0.3.0.dev956+gd75ac925
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
defs.hh
Go to the documentation of this file.
1 // This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
2#pragma once
3
4#include <ase/cxxaux.hh>
5
6namespace Ase {
7
8// = Constants ==
9static constexpr uint64_t U64MAX = +18446744073709551615ull; // 2^64-1
10static constexpr int64_t I63MAX = +9223372036854775807; // 2^63-1
11static constexpr int64_t I63MIN = -9223372036854775807 - 1; // -2^63
12static constexpr uint32_t U32MAX = +4294967295u; // 2^32-1
13static constexpr int32_t I31MAX = +2147483647; // 2^31-1
14static constexpr int32_t I31MIN = -2147483648; // -2^31
15static constexpr float M23MAX = 16777216; // 2^(1+23); IEEE-754 Float Mantissa maximum
16static constexpr float F32EPS = 5.9604644775390625e-08; // 2^-24, round-off error at 1.0
17static constexpr float F32MAX = 3.40282347e+38; // 7f7fffff, 2^128 * (1 - F32EPS)
18static constexpr double M52MAX = 9007199254740992; // 2^(1+52); IEEE-754 Double Mantissa maximum
19static constexpr double D64MAX = 1.7976931348623157e+308; // 0x7fefffff ffffffff, IEEE-754 Double Maximum
20static constexpr int64_t AUDIO_BLOCK_MAX_RENDER_SIZE = 2048;
21
22// == Forward Declarations ==
23enum class Error;
24enum class LoopID : uint64_t { INVALID = 0 };
25
26// == Struct Forward Declarations ==
27ASE_STRUCT_DECLS (AudioProcessorInfo);
28ASE_STRUCT_DECLS (Choice);
29ASE_STRUCT_DECLS (ClapParamUpdate);
30ASE_STRUCT_DECLS (ClipNote);
31ASE_STRUCT_DECLS (DeviceInfo);
32ASE_STRUCT_DECLS (DriverEntry);
33ASE_STRUCT_DECLS (Parameter);
34ASE_STRUCT_DECLS (Resource);
35ASE_STRUCT_DECLS (TelemetryField);
36ASE_STRUCT_DECLS (TelemetrySegment);
37ASE_STRUCT_DECLS (UserNote);
38
39// == Class Forward Declarations ==
40ASE_CLASS_DECLS (AudioChain);
41ASE_CLASS_DECLS (AudioCombo);
42ASE_CLASS_DECLS (AudioCombo);
43ASE_CLASS_DECLS (AudioEngineThread);
44ASE_CLASS_DECLS (ClapDeviceImpl);
45ASE_CLASS_DECLS (ClapPluginHandle);
46ASE_CLASS_DECLS (Clip);
47ASE_CLASS_DECLS (ClipImpl);
48ASE_CLASS_DECLS (Device);
49ASE_CLASS_DECLS (DeviceImpl);
50ASE_CLASS_DECLS (Emittable);
51ASE_CLASS_DECLS (FileCrawler);
52ASE_CLASS_DECLS (Gadget);
53ASE_CLASS_DECLS (GadgetImpl);
54ASE_CLASS_DECLS (Monitor);
55ASE_CLASS_DECLS (Object);
56ASE_CLASS_DECLS (Preference);
57ASE_CLASS_DECLS (Project);
58ASE_CLASS_DECLS (ProjectImpl);
59ASE_CLASS_DECLS (Property);
60ASE_CLASS_DECLS (PropertyImpl);
61ASE_CLASS_DECLS (ResourceCrawler);
62ASE_CLASS_DECLS (Server);
63ASE_CLASS_DECLS (ServerImpl);
64ASE_CLASS_DECLS (SharedBase);
65ASE_CLASS_DECLS (StreamReader);
66ASE_CLASS_DECLS (StreamWriter);
67ASE_CLASS_DECLS (Track);
68ASE_CLASS_DECLS (TrackImpl);
69ASE_CLASS_DECLS (Plugin);
70ASE_CLASS_DECLS (PluginImpl);
71
72class AudioEngine;
73class CustomDataContainer;
74
75using CallbackS = std::vector<std::function<void()>>;
76using DCallbackS = std::vector<std::function<void(double)>>;
77
78struct Event;
79class EventConnection;
80using EventConnectionW = std::weak_ptr<EventConnection>;
81using EventConnectionP = std::shared_ptr<EventConnection>;
82using EventHandler = std::function<void (const Event&)>;
83
84class SharedBase;
85using InstanceP = std::shared_ptr<SharedBase>;
86
87struct Value;
88using ValueP = std::shared_ptr<Value>;
89// ValueS derives std::vector<ValueP>
90
91class WritNode;
92using WritNodeS = std::vector<WritNode>;
93
94// == Serializable ==
96class Serializable : public virtual VirtualBase {
97 friend WritNode;
98protected:
99 virtual void serialize (WritNode &xs) = 0;
100 // see serialize.cc
101};
102
103// == IconString ==
104struct IconString : String {};
105
106} // Ase
107
Interface for serializable objects with Reflink support.
Definition defs.hh:96
virtual void serialize(WritNode &xs)=0
Serialize members and childern.
Definition serialize.cc:379
One entry in a Writ serialization document.
Definition serialize.hh:23
The Anklang C++ API namespace.
Definition api.hh:8
Error
Enum representing Error states.
Definition api.hh:21
typedef uint64_t
Common base type to allow casting between polymorphic classes.
Definition cxxaux.hh:220