Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
marker.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __SCHEMAS_AUDIO_MARKER_H__
11#define __SCHEMAS_AUDIO_MARKER_H__
12
13#include <cstdint>
14
16#include "utils/yaml.h"
17
18typedef enum MarkerType_v1
19{
20 MARKER_TYPE_START_v1,
21 MARKER_TYPE_END_v1,
22 MARKER_TYPE_CUSTOM_v1,
23} MarkerType_v1;
24
25static const cyaml_strval_t marker_type_strings_v1[] = {
26 { "start", MARKER_TYPE_START_v1 },
27 { "end", MARKER_TYPE_END_v1 },
28 { "custom", MARKER_TYPE_CUSTOM_v1 },
29};
30
31typedef struct Marker_v1
32{
34 char * name;
35 unsigned int track_name_hash;
36 int index;
37 MarkerType_v1 type;
38} Marker_v1;
39
40static const cyaml_schema_field_t marker_fields_schema_v1[] = {
41 YAML_FIELD_MAPPING_EMBEDDED (Marker_v1, base, arranger_object_fields_schema_v1),
42 YAML_FIELD_STRING_PTR (Marker_v1, name),
43 YAML_FIELD_UINT (Marker_v1, track_name_hash),
44 YAML_FIELD_INT (Marker_v1, index),
45 YAML_FIELD_ENUM (Marker_v1, type, marker_type_strings_v1),
46 YAML_FIELD_IGNORE_OPT ("schema_version"),
47
48 CYAML_FIELD_END
49};
50
51static const cyaml_schema_value_t marker_schema_v1 = {
52 YAML_VALUE_PTR (Marker_v1, marker_fields_schema_v1),
53};
54
55#endif
Arranger object schema.
YAML utils.