Add missing clean-up code.
[calfbox.git] / track.h
blobacc7aab67f4f8c1b749b4ef75ee4741fa5fac2cf
1 /*
2 Calf Box, an open source musical instrument.
3 Copyright (C) 2010-2011 Krzysztof Foltman
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CBOX_TRACK_H
20 #define CBOX_TRACK_H
22 #include "dom.h"
24 CBOX_EXTERN_CLASS(cbox_track_item)
25 CBOX_EXTERN_CLASS(cbox_track)
27 struct cbox_midi_pattern;
28 struct cbox_track;
30 struct cbox_track_item
32 CBOX_OBJECT_HEADER()
33 struct cbox_command_target cmd_target;
34 struct cbox_track *owner;
35 uint32_t time;
36 struct cbox_midi_pattern *pattern;
37 uint32_t offset;
38 uint32_t length;
41 struct cbox_track
43 CBOX_OBJECT_HEADER()
44 struct cbox_command_target cmd_target;
45 gchar *name;
46 gboolean external_output_set;
47 struct cbox_uuid external_output;
48 GList *items;
49 struct cbox_song *owner;
50 struct cbox_track_playback *pb;
53 extern struct cbox_track *cbox_track_new(struct cbox_document *document);
54 extern struct cbox_track_item *cbox_track_add_item(struct cbox_track *track, uint32_t time, struct cbox_midi_pattern *pattern, uint32_t offset, uint32_t length);
55 extern void cbox_track_update_playback(struct cbox_track *track, struct cbox_master *master);
57 #endif