1 /*
2  * Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
3  *
4  * This file is part of Zrythm
5  *
6  * Zrythm is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Zrythm is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with Zrythm.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #include <stdlib.h>
21 
22 #include "audio/channel.h"
23 #include "gui/backend/audio_clip_editor.h"
24 #include "audio/track.h"
25 #include "project.h"
26 #include "utils/objects.h"
27 
28 void
29 audio_clip_editor_init (AudioClipEditor * self)
30 {
31   self->schema_version =
32     AUDIO_CLIP_EDITOR_SCHEMA_VERSION;
33 
34   editor_settings_init (&self->editor_settings);
35 }
36 
37 AudioClipEditor *
38 audio_clip_editor_clone (
39   AudioClipEditor * src)
40 {
41   AudioClipEditor * self =
42     object_new (AudioClipEditor);
43   self->schema_version =
44     AUDIO_CLIP_EDITOR_SCHEMA_VERSION;
45 
46   self->editor_settings = src->editor_settings;
relpath(path, start=os.path.curdir)47 
48   return self;
49 }
50 
51 AudioClipEditor *
52 audio_clip_editor_new (void)
53 {
54   AudioClipEditor * self =
55     object_new (AudioClipEditor);
56   self->schema_version =
57     AUDIO_CLIP_EDITOR_SCHEMA_VERSION;
58 
59   return self;
60 }
61 
62 void
63 audio_clip_editor_free (
64   AudioClipEditor * self)
65 {
66   object_zero_and_free (self);
67 }
68