Ardour  8.12
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 #ifndef __ardour_audio_playlist_h__
23 #define __ardour_audio_playlist_h__
24 
25 #include <vector>
26 #include <list>
27 
28 #include "ardour/ardour.h"
29 #include "ardour/playlist.h"
30 
31 namespace ARDOUR {
32 
33 class Session;
34 class AudioRegion;
35 class Source;
36 class AudioPlaylist;
37 
39 {
40 public:
41  AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
42  AudioPlaylist (Session&, std::string name, bool hidden = false);
43  AudioPlaylist (std::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false);
44  AudioPlaylist (std::shared_ptr<const AudioPlaylist>, timepos_t const & start, timepos_t const & cnt, std::string name, bool hidden = false);
45 
46  timecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, timepos_t const & start, timecnt_t const & cnt, uint32_t chan_n=0);
47 
48  bool destroy_region (std::shared_ptr<Region>);
49 
50 protected:
51 
52  void pre_combine (std::vector<std::shared_ptr<Region> >&);
53  void post_combine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>);
54  void pre_uncombine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>);
55 
56 private:
57  int set_state (const XMLNode&, int version);
58  void dump () const;
59  bool region_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
60  void source_offset_changed (std::shared_ptr<AudioRegion>);
61  void load_legacy_crossfades (const XMLNode&, int version);
62 };
63 
64 } /* namespace ARDOUR */
65 
66 #endif /* __ardour_audio_playlist_h__ */
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