Ardour  9.0-pre0-582-g084a23a80d
audioplaylist.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
5  * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #pragma once
23 
24 #include <vector>
25 #include <list>
26 
27 #include "ardour/ardour.h"
28 #include "ardour/playlist.h"
29 
30 namespace ARDOUR {
31 
32 class Session;
33 class AudioRegion;
34 class Source;
35 class AudioPlaylist;
36 
38 {
39 public:
40  AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
41  AudioPlaylist (Session&, std::string name, bool hidden = false);
42  AudioPlaylist (std::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false);
43  AudioPlaylist (std::shared_ptr<const AudioPlaylist>, timepos_t const & start, timepos_t const & cnt, std::string name, bool hidden = false);
44 
45  timecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, timepos_t const & start, timecnt_t const & cnt, uint32_t chan_n=0);
46 
47  bool destroy_region (std::shared_ptr<Region>);
48 
49 protected:
50 
51  void pre_combine (std::vector<std::shared_ptr<Region> >&);
52  void post_combine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>);
53  void pre_uncombine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>);
54 
55 private:
56  int set_state (const XMLNode&, int version);
57  void dump () const;
58  bool region_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
59  void source_offset_changed (std::shared_ptr<AudioRegion>);
60  void load_legacy_crossfades (const XMLNode&, int version);
61 };
62 
63 } /* namespace ARDOUR */
64 
AudioPlaylist(std::shared_ptr< const AudioPlaylist >, std::string name, bool hidden=false)
void pre_uncombine(std::vector< std::shared_ptr< Region > > &, std::shared_ptr< Region >)
bool region_changed(const PBD::PropertyChange &, std::shared_ptr< Region >)
void source_offset_changed(std::shared_ptr< AudioRegion >)
AudioPlaylist(std::shared_ptr< const AudioPlaylist >, timepos_t const &start, timepos_t const &cnt, std::string name, bool hidden=false)
AudioPlaylist(Session &, const XMLNode &, bool hidden=false)
void post_combine(std::vector< std::shared_ptr< Region > > &, std::shared_ptr< Region >)
int set_state(const XMLNode &, int version)
void load_legacy_crossfades(const XMLNode &, int version)
AudioPlaylist(Session &, std::string name, bool hidden=false)
bool destroy_region(std::shared_ptr< Region >)
void pre_combine(std::vector< std::shared_ptr< Region > > &)
timecnt_t read(Sample *dst, Sample *mixdown, float *gain_buffer, timepos_t const &start, timecnt_t const &cnt, uint32_t chan_n=0)
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< bool > hidden
PBD::PropertyDescriptor< timepos_t > start