mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Clean up region.h and trim include tree.
git-svn-id: svn://localhost/ardour2/branches/3.0@8312 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fe879145fe
commit
3f30e8093e
13 changed files with 103 additions and 95 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
#include "ardour/audio_port.h"
|
#include "ardour/audio_port.h"
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/export_channel_configuration.h"
|
#include "ardour/export_channel_configuration.h"
|
||||||
#include "ardour/export_handler.h"
|
#include "ardour/export_handler.h"
|
||||||
#include "ardour/io.h"
|
#include "ardour/io.h"
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "pbd/filesystem.h"
|
#include "pbd/filesystem.h"
|
||||||
|
|
||||||
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/export_status.h"
|
#include "ardour/export_status.h"
|
||||||
#include "ardour/export_handler.h"
|
#include "ardour/export_handler.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "vamp-sdk/Plugin.h"
|
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include "ardour/audioregion.h"
|
#include "vamp-sdk/Plugin.h"
|
||||||
|
#include "ardour/types.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ namespace ARDOUR {
|
||||||
extern PBD::PropertyDescriptor<bool> follow_overlap;
|
extern PBD::PropertyDescriptor<bool> follow_overlap;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AudioRegion;
|
|
||||||
class Playlist;
|
class Playlist;
|
||||||
|
|
||||||
class Crossfade : public ARDOUR::AudioRegion
|
class Crossfade : public ARDOUR::AudioRegion
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
|
|
||||||
#include "ardour/audioregion.h"
|
#include "pbd/signals.h"
|
||||||
|
|
||||||
#include "ardour/buffer_set.h"
|
#include "ardour/buffer_set.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
@ -35,6 +36,7 @@ namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
class AudioTrack;
|
class AudioTrack;
|
||||||
class AudioPort;
|
class AudioPort;
|
||||||
|
class AudioRegion;
|
||||||
|
|
||||||
/// Export channel base class interface for different source types
|
/// Export channel base class interface for different source types
|
||||||
class ExportChannel : public boost::less_than_comparable<ExportChannel>
|
class ExportChannel : public boost::less_than_comparable<ExportChannel>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@
|
||||||
#define __ardour_filter_h__
|
#define __ardour_filter_h__
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "ardour/region.h"
|
|
||||||
|
#include "ardour/types.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class Region
|
||||||
/** Note: changing the name of a Region does not constitute an edit */
|
/** Note: changing the name of a Region does not constitute an edit */
|
||||||
bool set_name (const std::string& str);
|
bool set_name (const std::string& str);
|
||||||
|
|
||||||
const DataType& data_type() const { return _type; }
|
const DataType& data_type () const { return _type; }
|
||||||
|
|
||||||
AnalysisFeatureList transients () { return _transients; };
|
AnalysisFeatureList transients () { return _transients; };
|
||||||
|
|
||||||
|
|
@ -110,51 +110,52 @@ class Region
|
||||||
*/
|
*/
|
||||||
framepos_t position () const { return _position; }
|
framepos_t position () const { return _position; }
|
||||||
framepos_t start () const { return _start; }
|
framepos_t start () const { return _start; }
|
||||||
framecnt_t length() const { return _length; }
|
framecnt_t length () const { return _length; }
|
||||||
layer_t layer () const { return _layer; }
|
layer_t layer () const { return _layer; }
|
||||||
|
|
||||||
framecnt_t source_length(uint32_t n) const;
|
framecnt_t source_length(uint32_t n) const;
|
||||||
|
|
||||||
/* these two are valid ONLY during a StateChanged signal handler */
|
/* these two are valid ONLY during a StateChanged signal handler */
|
||||||
|
|
||||||
framepos_t last_position() const { return _last_position; }
|
framepos_t last_position () const { return _last_position; }
|
||||||
framecnt_t last_length() const { return _last_length; }
|
framecnt_t last_length () const { return _last_length; }
|
||||||
|
|
||||||
framepos_t ancestral_start () const { return _ancestral_start; }
|
framepos_t ancestral_start () const { return _ancestral_start; }
|
||||||
framecnt_t ancestral_length () const { return _ancestral_length; }
|
framecnt_t ancestral_length () const { return _ancestral_length; }
|
||||||
float stretch() const { return _stretch; }
|
|
||||||
float shift() const { return _shift; }
|
float stretch () const { return _stretch; }
|
||||||
|
float shift () const { return _shift; }
|
||||||
|
|
||||||
void set_ancestral_data (framepos_t start, framepos_t length, float stretch, float shift);
|
void set_ancestral_data (framepos_t start, framepos_t length, float stretch, float shift);
|
||||||
|
|
||||||
frameoffset_t sync_offset(int& dir) const;
|
frameoffset_t sync_offset (int& dir) const;
|
||||||
framepos_t sync_position() const;
|
framepos_t sync_position () const;
|
||||||
framepos_t sync_point () const;
|
framepos_t sync_point () const;
|
||||||
|
|
||||||
framepos_t adjust_to_sync (framepos_t) const;
|
framepos_t adjust_to_sync (framepos_t) const;
|
||||||
|
|
||||||
/* first_frame() is an alias; last_frame() just hides some math */
|
/* first_frame() is an alias; last_frame() just hides some math */
|
||||||
|
|
||||||
framepos_t first_frame() const { return _position; }
|
framepos_t first_frame () const { return _position; }
|
||||||
framepos_t last_frame() const { return _position + _length - 1; }
|
framepos_t last_frame () const { return _position + _length - 1; }
|
||||||
|
|
||||||
bool hidden() const { return _hidden; }
|
bool hidden () const { return _hidden; }
|
||||||
bool muted() const { return _muted; }
|
bool muted () const { return _muted; }
|
||||||
bool opaque () const { return _opaque; }
|
bool opaque () const { return _opaque; }
|
||||||
bool locked() const { return _locked; }
|
bool locked () const { return _locked; }
|
||||||
bool position_locked() const { return _position_locked; }
|
bool position_locked () const { return _position_locked; }
|
||||||
bool valid_transients() const { return _valid_transients; }
|
bool valid_transients () const { return _valid_transients; }
|
||||||
bool automatic() const { return _automatic; }
|
bool automatic () const { return _automatic; }
|
||||||
bool whole_file() const { return _whole_file; }
|
bool whole_file () const { return _whole_file; }
|
||||||
bool captured() const { return !(_import || _external); }
|
bool captured () const { return !(_import || _external); }
|
||||||
bool can_move() const { return !_position_locked; }
|
bool can_move () const { return !_position_locked; }
|
||||||
bool sync_marked() const { return _sync_marked; }
|
bool sync_marked () const { return _sync_marked; }
|
||||||
bool external() const { return _external; }
|
bool external () const { return _external; }
|
||||||
bool import() const { return _import; }
|
bool import () const { return _import; }
|
||||||
|
|
||||||
Trimmable::CanTrim can_trim() const;
|
Trimmable::CanTrim can_trim () const;
|
||||||
|
|
||||||
PositionLockStyle position_lock_style() const { return _position_lock_style; }
|
PositionLockStyle position_lock_style () const { return _position_lock_style; }
|
||||||
void set_position_lock_style (PositionLockStyle ps);
|
void set_position_lock_style (PositionLockStyle ps);
|
||||||
void recompute_position_from_lock_style ();
|
void recompute_position_from_lock_style ();
|
||||||
|
|
||||||
|
|
@ -214,9 +215,9 @@ class Region
|
||||||
|
|
||||||
int apply (Filter &, Progress* progress = 0);
|
int apply (Filter &, Progress* progress = 0);
|
||||||
|
|
||||||
virtual uint64_t read_data_count() const { return _read_data_count; }
|
virtual uint64_t read_data_count () const { return _read_data_count; }
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Playlist> playlist() const { return _playlist.lock(); }
|
boost::shared_ptr<ARDOUR::Playlist> playlist () const { return _playlist.lock(); }
|
||||||
virtual void set_playlist (boost::weak_ptr<ARDOUR::Playlist>);
|
virtual void set_playlist (boost::weak_ptr<ARDOUR::Playlist>);
|
||||||
|
|
||||||
void source_deleted (boost::weak_ptr<Source>);
|
void source_deleted (boost::weak_ptr<Source>);
|
||||||
|
|
@ -224,8 +225,8 @@ class Region
|
||||||
boost::shared_ptr<Source> source (uint32_t n=0) const { return _sources[ (n < _sources.size()) ? n : 0 ]; }
|
boost::shared_ptr<Source> source (uint32_t n=0) const { return _sources[ (n < _sources.size()) ? n : 0 ]; }
|
||||||
uint32_t n_channels() const { return _sources.size(); }
|
uint32_t n_channels() const { return _sources.size(); }
|
||||||
|
|
||||||
const SourceList& sources() const { return _sources; }
|
const SourceList& sources () const { return _sources; }
|
||||||
const SourceList& master_sources() const { return _master_sources; }
|
const SourceList& master_sources () const { return _master_sources; }
|
||||||
|
|
||||||
std::vector<std::string> master_source_names();
|
std::vector<std::string> master_source_names();
|
||||||
void set_master_sources (const SourceList&);
|
void set_master_sources (const SourceList&);
|
||||||
|
|
@ -233,10 +234,10 @@ class Region
|
||||||
/* automation */
|
/* automation */
|
||||||
|
|
||||||
virtual boost::shared_ptr<Evoral::Control>
|
virtual boost::shared_ptr<Evoral::Control>
|
||||||
control(const Evoral::Parameter& id, bool create=false) = 0;
|
control (const Evoral::Parameter& id, bool create=false) = 0;
|
||||||
|
|
||||||
virtual boost::shared_ptr<const Evoral::Control>
|
virtual boost::shared_ptr<const Evoral::Control>
|
||||||
control(const Evoral::Parameter& id) const = 0;
|
control (const Evoral::Parameter& id) const = 0;
|
||||||
|
|
||||||
/* serialization */
|
/* serialization */
|
||||||
|
|
||||||
|
|
@ -305,11 +306,13 @@ class Region
|
||||||
|
|
||||||
/** Construct a region from multiple sources*/
|
/** Construct a region from multiple sources*/
|
||||||
Region (const SourceList& srcs);
|
Region (const SourceList& srcs);
|
||||||
|
|
||||||
/** Construct a region from another region, at an offset within that region */
|
/** Construct a region from another region, at an offset within that region */
|
||||||
Region (boost::shared_ptr<const Region>, frameoffset_t start_offset = 0, bool start_relative = true);
|
Region (boost::shared_ptr<const Region>, frameoffset_t start_offset = 0, bool start_relative = true);
|
||||||
/** Construct a region as a copy of another region, but with different sources */
|
/** Construct a region as a copy of another region, but with different sources */
|
||||||
Region (boost::shared_ptr<const Region>, const SourceList&);
|
Region (boost::shared_ptr<const Region>, const SourceList&);
|
||||||
/** normal Region copy constructor */
|
|
||||||
|
/** Normal Region copy constructor */
|
||||||
Region (boost::shared_ptr<const Region>);
|
Region (boost::shared_ptr<const Region>);
|
||||||
|
|
||||||
/** Constructor for derived types only */
|
/** Constructor for derived types only */
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
|
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
#include "ardour/region.h"
|
|
||||||
|
|
||||||
class XMLNode;
|
class XMLNode;
|
||||||
|
|
||||||
|
|
@ -38,8 +37,7 @@ class Session;
|
||||||
class AudioRegion;
|
class AudioRegion;
|
||||||
|
|
||||||
class RegionFactory {
|
class RegionFactory {
|
||||||
|
public:
|
||||||
public:
|
|
||||||
typedef std::map<PBD::ID,boost::shared_ptr<Region> > RegionMap;
|
typedef std::map<PBD::ID,boost::shared_ptr<Region> > RegionMap;
|
||||||
|
|
||||||
static boost::shared_ptr<Region> wholefile_region_by_name (const std::string& name);
|
static boost::shared_ptr<Region> wholefile_region_by_name (const std::string& name);
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
#include <glib/gstdio.h> // for g_remove()
|
#include <glib/gstdio.h> // for g_remove()
|
||||||
|
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
|
#include "pbd/failed_constructor.h"
|
||||||
|
|
||||||
#include "ardour/audioanalyser.h"
|
#include "ardour/audioanalyser.h"
|
||||||
#include "ardour/readable.h"
|
#include "ardour/readable.h"
|
||||||
#include "ardour/readable.h"
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include "ardour/audio_port.h"
|
#include "ardour/audio_port.h"
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/export_channel.h"
|
#include "ardour/export_channel.h"
|
||||||
#include "ardour/export_failed.h"
|
#include "ardour/export_failed.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <cmath>
|
||||||
#include "ardour/onset_detector.h"
|
#include "ardour/onset_detector.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <cmath>
|
||||||
#include "ardour/transient_detector.h"
|
#include "ardour/transient_detector.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
|
||||||
2
wscript
2
wscript
|
|
@ -458,7 +458,7 @@ def configure(conf):
|
||||||
if Options.options.boost_sp_debug:
|
if Options.options.boost_sp_debug:
|
||||||
conf.env.append_value('CXXFLAGS_BOOST', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
|
conf.env.append_value('CXXFLAGS_BOOST', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
|
||||||
|
|
||||||
autowaf.check_header(conf, 'jack/session.h', define="JACK_SESSION")
|
autowaf.check_header(conf, 'jack/session.h', define="JACK_SESSION", mandatory = False)
|
||||||
|
|
||||||
conf.check_cc(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
|
conf.check_cc(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
|
||||||
execute = "1",
|
execute = "1",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue