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 38 class LIBARDOUR_API AudioPlaylist : public ARDOUR::Playlist 39 { 40 public: 41 AudioPlaylist (Session&, const XMLNode&, bool hidden = false); 42 AudioPlaylist (Session&, std::string name, bool hidden = false); 43 AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false); 44 AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, samplepos_t start, samplecnt_t cnt, std::string name, bool hidden = false); 45 46 samplecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, samplepos_t start, samplecnt_t cnt, uint32_t chan_n=0); 47 48 bool destroy_region (boost::shared_ptr<Region>); 49 50 protected: 51 52 void pre_combine (std::vector<boost::shared_ptr<Region> >&); 53 void post_combine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>); 54 void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::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&, boost::shared_ptr<Region>); 60 void source_offset_changed (boost::shared_ptr<AudioRegion>); 61 void load_legacy_crossfades (const XMLNode&, int version); 62 }; 63 64 } /* namespace ARDOUR */ 65 66 #endif /* __ardour_audio_playlist_h__ */ 67