diff options
Diffstat (limited to 'libs/ardour/ardour')
25 files changed, 260 insertions, 286 deletions
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 92c8e82df8..8f081ab58d 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -36,9 +36,6 @@ #include <ardour/ardour.h> #include <ardour/configuration.h> -#include <ardour/session.h> -#include <ardour/route_group.h> -#include <ardour/route.h> #include <ardour/utils.h> #include <ardour/diskstream.h> #include <ardour/audioplaylist.h> @@ -261,7 +258,7 @@ class AudioDiskstream : public Diskstream void process_varispeed_playback(nframes_t nframes, boost::shared_ptr<ChannelList> c); /* The two central butler operations */ - int do_flush (Session::RunContext context, bool force = false); + int do_flush (RunContext context, bool force = false); int do_refill () { return _do_refill(_mixdown_buffer, _gain_buffer); } int do_refill_with_alloc (); diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index d99960334d..ca4624f281 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -23,9 +23,6 @@ #include <set> #include <map> #include <boost/shared_ptr.hpp> -#include <ardour/session_object.h> -#include <ardour/automation_list.h> -#include <ardour/automation_control.h> #include <ardour/event_type_map.h> #include <evoral/ControlSet.hpp> #include <evoral/Sequence.hpp> diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 4cb6d1a79a..3f22e6d57f 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -28,7 +28,6 @@ namespace ARDOUR { -class AutomationList; class Session; class Automatable; diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index b0ac26342f..211933c778 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -20,16 +20,17 @@ #ifndef __ardour_diskstream_h__ #define __ardour_diskstream_h__ -#include <sigc++/signal.h> - -#include <cmath> #include <string> #include <queue> #include <map> #include <vector> - +#include <cmath> #include <time.h> +#include <sigc++/signal.h> + +#include <evoral/types.hpp> + #include <pbd/fastlog.h> #include <pbd/ringbufferNPT.h> #include <pbd/stateful.h> @@ -37,20 +38,23 @@ #include <ardour/ardour.h> #include <ardour/configuration.h> -#include <ardour/session.h> -#include <ardour/route_group.h> -#include <ardour/route.h> +#include <ardour/location.h> +#include <ardour/session_object.h> +#include <ardour/types.h> #include <ardour/utils.h> +#include <ardour/chan_count.h> struct tm; namespace ARDOUR { class AudioEngine; +class IO; +class Playlist; +class Processor; +class Region; class Send; class Session; -class Playlist; -class IO; class Diskstream : public SessionObject { @@ -195,7 +199,7 @@ class Diskstream : public SessionObject }; /* The two central butler operations */ - virtual int do_flush (Session::RunContext context, bool force = false) = 0; + virtual int do_flush (RunContext context, bool force = false) = 0; virtual int do_refill () = 0; /** For non-butler contexts (allocates temporary working buffers) */ diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index 213bd2d9fa..d7c363860c 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -22,7 +22,6 @@ #define __ardour_export_channel_h__ #include <ardour/audioregion.h> -#include <ardour/audio_track.h> #include <ardour/buffer_set.h> #include <set> @@ -33,6 +32,8 @@ namespace ARDOUR { class Session; +class AudioTrack; +class AudioPort; /// Export channel base class interface for different source types class ExportChannel diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index e44c50f394..fb9f5dcbbc 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -21,11 +21,10 @@ #ifndef __ardour_export_filename_h__ #define __ardour_export_filename_h__ +#include <boost/shared_ptr.hpp> #include <glibmm/ustring.h> #include <pbd/statefuldestructible.h> -#include <ardour/session.h> - using Glib::ustring; namespace ARDOUR diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index 6142869fe0..b918963ae8 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -28,8 +28,8 @@ #include <boost/shared_ptr.hpp> #include <ardour/ardour.h> -#include <ardour/session.h> #include <ardour/types.h> +#include <ardour/session.h> namespace ARDOUR { diff --git a/libs/ardour/ardour/gain.h b/libs/ardour/ardour/gain.h index 0c7d9f957d..207f794910 100644 --- a/libs/ardour/ardour/gain.h +++ b/libs/ardour/ardour/gain.h @@ -22,7 +22,6 @@ #include "ardour.h" #include "automation_list.h" -#include <evoral/Curve.hpp> namespace ARDOUR { diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index 0215ea9b9a..8d2ea7b1c3 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -27,7 +27,6 @@ #include <pbd/stateful.h> #include <ardour/ardour.h> #include <ardour/audioengine.h> -#include <ardour/io.h> #include <ardour/io_processor.h> namespace ARDOUR { diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index a3c0468930..5a3c5c2b12 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -42,6 +42,7 @@ #include <ardour/chan_count.h> #include <ardour/latent.h> #include <ardour/automation_control.h> +#include <ardour/session_object.h> using std::string; using std::vector; diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 3739c496c5..1c9da68767 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -21,9 +21,6 @@ #define __ardour_redirect_h__ #include <string> -#include <vector> -#include <set> -#include <map> #include <boost/shared_ptr.hpp> #include <sigc++/signal.h> @@ -33,19 +30,15 @@ #include <ardour/ardour.h> #include <ardour/processor.h> -#include <ardour/io.h> -#include <ardour/automation_list.h> -using std::map; -using std::set; using std::string; -using std::vector; class XMLNode; namespace ARDOUR { class Session; +class IO; /** A mixer strip element (Processor) with Jack ports (IO). */ @@ -59,17 +52,18 @@ class IOProcessor : public Processor IOProcessor (const IOProcessor&); virtual ~IOProcessor (); - virtual ChanCount output_streams() const { return _io->n_outputs(); } - virtual ChanCount input_streams () const { return _io->n_inputs(); } - virtual ChanCount natural_output_streams() const { return _io->n_outputs(); } - virtual ChanCount natural_input_streams () const { return _io->n_inputs(); } + virtual ChanCount output_streams() const; + virtual ChanCount input_streams () const; + virtual ChanCount natural_output_streams() const; + virtual ChanCount natural_input_streams () const; boost::shared_ptr<IO> io() { return _io; } boost::shared_ptr<const IO> io() const { return _io; } - virtual void automation_snapshot (nframes_t now, bool force) { _io->automation_snapshot(now, force); } + virtual void automation_snapshot (nframes_t now, bool force); - virtual void run_in_place (BufferSet& in, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0; + virtual void run_in_place (BufferSet& in, nframes_t start, nframes_t end, + nframes_t nframes, nframes_t offset) = 0; void silence (nframes_t nframes, nframes_t offset); diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index 02b0132f7a..852a329544 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -37,25 +37,23 @@ #include <ardour/ardour.h> #include <ardour/configuration.h> -#include <ardour/session.h> -#include <ardour/route_group.h> -#include <ardour/route.h> -#include <ardour/utils.h> #include <ardour/diskstream.h> #include <ardour/midi_playlist.h> #include <ardour/midi_ring_buffer.h> #include <ardour/midi_state_tracker.h> +#include <ardour/utils.h> struct tm; namespace ARDOUR { +class IO; class MidiEngine; +class MidiPort; +class MidiRingbuffer; +class SMFSource; class Send; class Session; -class MidiPlaylist; -class SMFSource; -class IO; class MidiDiskstream : public Diskstream { @@ -145,7 +143,7 @@ class MidiDiskstream : public Diskstream private: /* The two central butler operations */ - int do_flush (Session::RunContext context, bool force = false); + int do_flush (RunContext context, bool force = false); int do_refill (); int do_refill_with_alloc(); diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h index 67779f0e07..c9bf9a605a 100644 --- a/libs/ardour/ardour/mix.h +++ b/libs/ardour/ardour/mix.h @@ -21,26 +21,25 @@ #include <ardour/types.h> #include <ardour/utils.h> -#include <ardour/io.h> #if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) extern "C" { /* SSE functions */ - float x86_sse_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); - void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); - void x86_sse_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); - void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); + float x86_sse_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); + void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); + void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); + void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); } -void x86_sse_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); +void x86_sse_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); /* debug wrappers for SSE functions */ -float debug_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); -void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); -void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); -void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); +float debug_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); +void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); +void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); +void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); #endif diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index f523f431c4..34b99e63bf 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -33,7 +33,6 @@ #include <ardour/types.h> #include <ardour/automation_control.h> #include <ardour/processor.h> -#include <ardour/session.h> using std::istream; using std::ostream; diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 5cf4b4cbe0..2583728ef3 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -29,7 +29,7 @@ #include <ardour/ardour.h> #include <ardour/types.h> #include <ardour/processor.h> -#include <ardour/automation_list.h> +#include <ardour/automation_control.h> class XMLNode; diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 759d532e82..896b35e734 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -20,13 +20,13 @@ #ifndef __ardour_port_h__ #define __ardour_port_h__ -#include "ardour/data_type.h" -#include "ardour/types.h" -#include <sigc++/trackable.h> -#include <jack/jack.h> -#include <string> #include <set> +#include <string> #include <vector> +#include <jack/jack.h> +#include <sigc++/trackable.h> +#include "ardour/data_type.h" +#include "ardour/types.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index da00c77dab..5a1011966c 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -33,6 +33,7 @@ #include <ardour/buffer_set.h> #include <ardour/automatable.h> #include <ardour/latent.h> +#include <ardour/session_object.h> class XMLNode; diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 66f5d2be35..a84057a909 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -30,6 +30,7 @@ #include <ardour/data_type.h> #include <ardour/automatable.h> #include <ardour/readable.h> +#include <ardour/session_object.h> class XMLNode; diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index b88f3b225a..ed16477310 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -28,6 +28,7 @@ class XMLNode; namespace ARDOUR { class Session; +class AudioRegion; class RegionFactory { diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 1d3fc25164..cbf4910899 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -27,6 +27,7 @@ #include <string> #include <boost/shared_ptr.hpp> +#include <boost/weak_ptr.hpp> #include <pbd/fastlog.h> #include <glibmm/thread.h> @@ -38,13 +39,12 @@ #include <ardour/ardour.h> #include <ardour/io.h> -#include <ardour/session.h> -#include <ardour/io_processor.h> #include <ardour/types.h> namespace ARDOUR { class Processor; +class IOProcessor; class Send; class RouteGroup; @@ -154,7 +154,7 @@ class Route : public IO ProcessorList::iterator i; for (i = _processors.begin(); i != _processors.end() && n; ++i, --n); if (i == _processors.end()) { - return boost::shared_ptr<IOProcessor> (); + return boost::shared_ptr<Processor> (); } else { return *i; } @@ -227,7 +227,7 @@ class Route : public IO IO* control_outs() { return _control_outs; } bool feeds (boost::shared_ptr<Route>); - set<boost::shared_ptr<Route> > fed_by; + std::set<boost::shared_ptr<Route> > fed_by; struct ToggleControllable : public PBD::Controllable { enum ToggleType { diff --git a/libs/ardour/ardour/route_group_specialized.h b/libs/ardour/ardour/route_group_specialized.h index 9e04c46d0e..d2ad734b9d 100644 --- a/libs/ardour/ardour/route_group_specialized.h +++ b/libs/ardour/ardour/route_group_specialized.h @@ -21,7 +21,7 @@ #define __ardour_route_group_specialized_h__ #include <ardour/route_group.h> -#include <ardour/audio_track.h> +#include <ardour/track.h> namespace ARDOUR { diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index d5078bd7df..497027866b 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -27,7 +27,6 @@ #include <pbd/stateful.h> #include <ardour/ardour.h> #include <ardour/audioengine.h> -#include <ardour/io.h> #include <ardour/io_processor.h> namespace ARDOUR { diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 7cdc11a054..60e6aa724e 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -20,41 +20,38 @@ #ifndef __ardour_session_h__ #define __ardour_session_h__ -#include <string> #include <list> #include <map> -#include <vector> #include <set> #include <stack> +#include <string> +#include <vector> +#include <stdint.h> +#include <boost/dynamic_bitset.hpp> #include <boost/scoped_ptr.hpp> #include <boost/weak_ptr.hpp> -#include <boost/dynamic_bitset.hpp> - -#include <stdint.h> #include <sndfile.h> #include <glibmm/thread.h> #include <pbd/error.h> -#include <pbd/undo.h> #include <pbd/pool.h> #include <pbd/rcu.h> #include <pbd/statefuldestructible.h> +#include <pbd/undo.h> -#include <midi++/types.h> #include <midi++/mmc.h> +#include <midi++/types.h> -#include <pbd/stateful.h> #include <pbd/destructible.h> +#include <pbd/stateful.h> #include <ardour/ardour.h> +#include <ardour/chan_count.h> #include <ardour/configuration.h> #include <ardour/location.h> -#include <ardour/gain.h> -#include <ardour/chan_count.h> - #include <ardour/smpte.h> class XMLTree; @@ -69,51 +66,50 @@ namespace PBD { class Controllable; } +namespace Evoral { + class Curve; +} + namespace ARDOUR { -class Port; +class AudioDiskstream; class AudioEngine; -class Slave; -class Diskstream; -class Route; -class AuxInput; -class Source; +class AudioFileSource; +class AudioRegion; class AudioSource; +class AudioTrack; +class Auditioner; +class AutomationList; +class AuxInput; class BufferSet; -class IO; - +class Bundle; +class ControlProtocolInfo; class Diskstream; -class AudioDiskstream; +class ExportHandler; +class ExportStatus; +class IO; +class IOProcessor; class MidiDiskstream; -class AudioFileSource; +class MidiRegion; class MidiSource; -class Auditioner; -class Processor; -class Send; -class IOProcessor; -class PortInsert; -class PluginInsert; -class Bundle; -class TempoMap; -class AudioTrack; +class MidiTrack; class NamedSelection; -class AudioRegion; - -class Region; class Playlist; -class VSTPlugin; -class ControlProtocolInfo; - -class MidiTrack; -class MidiRegion; +class PluginInsert; +class Port; +class PortInsert; +class Processor; +class Region; +class Route; +class RouteGroup; class SMFSource; - +class Send; class SessionDirectory; class SessionMetadata; -class ExportHandler; -class ExportStatus; - -struct RouteGroup; +class Slave; +class Source; +class TempoMap; +class VSTPlugin; using std::vector; using std::string; @@ -136,115 +132,115 @@ class Session : public PBD::StatefulDestructible }; struct Event { - enum Type { - SetTransportSpeed, - SetDiskstreamSpeed, - Locate, - LocateRoll, - LocateRollLocate, - SetLoop, - PunchIn, - PunchOut, - RangeStop, - RangeLocate, - Overwrite, - SetSlaveSource, - Audition, - InputConfigurationChange, - SetAudioRange, - SetPlayRange, - - /* only one of each of these events - can be queued at any one time - */ - - StopOnce, - AutoLoop - }; - - enum Action { - Add, - Remove, - Replace, - Clear - }; + enum Type { + SetTransportSpeed, + SetDiskstreamSpeed, + Locate, + LocateRoll, + LocateRollLocate, + SetLoop, + PunchIn, + PunchOut, + RangeStop, + RangeLocate, + Overwrite, + SetSlaveSource, + Audition, + InputConfigurationChange, + SetAudioRange, + SetPlayRange, + + /* only one of each of these events + can be queued at any one time + */ + + StopOnce, + AutoLoop + }; + + enum Action { + Add, + Remove, + Replace, + Clear + }; Type type; - Action action; - nframes_t action_frame; - nframes_t target_frame; - double speed; + Action action; + nframes_t action_frame; + nframes_t target_frame; + double speed; - union { + union { void* ptr; bool yes_or_no; - nframes_t target2_frame; + nframes_t target2_frame; SlaveSource slave; Route* route; - }; + }; - boost::shared_ptr<Region> region; + boost::shared_ptr<Region> region; - list<AudioRange> audio_range; - list<MusicRange> music_range; + list<AudioRange> audio_range; + list<MusicRange> music_range; - Event(Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false) - : type (t), - action (a), - action_frame (when), - target_frame (where), - speed (spd), - yes_or_no (yn) {} + Event(Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false) + : type (t), + action (a), + action_frame (when), + target_frame (where), + speed (spd), + yes_or_no (yn) {} - void set_ptr (void* p) { - ptr = p; - } + void set_ptr (void* p) { + ptr = p; + } - bool before (const Event& other) const { - return action_frame < other.action_frame; - } + bool before (const Event& other) const { + return action_frame < other.action_frame; + } - bool after (const Event& other) const { - return action_frame > other.action_frame; - } + bool after (const Event& other) const { + return action_frame > other.action_frame; + } - static bool compare (const Event *e1, const Event *e2) { - return e1->before (*e2); - } + static bool compare (const Event *e1, const Event *e2) { + return e1->before (*e2); + } - void *operator new (size_t ignored) { - return pool.alloc (); - } + void *operator new (size_t ignored) { + return pool.alloc (); + } - void operator delete(void *ptr, size_t size) { - pool.release (ptr); - } + void operator delete(void *ptr, size_t size) { + pool.release (ptr); + } - static const nframes_t Immediate = 0; + static const nframes_t Immediate = 0; - private: - static MultiAllocSingleReleasePool pool; + private: + static MultiAllocSingleReleasePool pool; }; /* creating from an XML file */ Session (AudioEngine&, - const string& fullpath, - const string& snapshot_name, - string mix_template = ""); + const string& fullpath, + const string& snapshot_name, + string mix_template = ""); /* creating a new Session */ Session (AudioEngine&, - string fullpath, - string snapshot_name, - AutoConnectOption input_auto_connect, - AutoConnectOption output_auto_connect, - uint32_t control_out_channels, - uint32_t master_out_channels, - uint32_t n_physical_in, - uint32_t n_physical_out, - nframes_t initial_length); + string fullpath, + string snapshot_name, + AutoConnectOption input_auto_connect, + AutoConnectOption output_auto_connect, + uint32_t control_out_channels, + uint32_t master_out_channels, + uint32_t n_physical_in, + uint32_t n_physical_out, + nframes_t initial_length); virtual ~Session (); @@ -573,12 +569,12 @@ class Session : public PBD::StatefulDestructible static sigc::signal<void> EndTimeChanged; static sigc::signal<void> SMPTEOffsetChanged; - void request_slave_source (SlaveSource); - bool synced_to_jack() const { return Config->get_slave_source() == JACK; } + void request_slave_source (SlaveSource); + bool synced_to_jack() const { return Config->get_slave_source() == JACK; } - double transport_speed() const { return _transport_speed; } - bool transport_stopped() const { return _transport_speed == 0.0f; } - bool transport_rolling() const { return _transport_speed != 0.0f; } + double transport_speed() const { return _transport_speed; } + bool transport_stopped() const { return _transport_speed == 0.0f; } + bool transport_rolling() const { return _transport_speed != 0.0f; } void set_silent (bool yn); bool silent () { return _silent; } @@ -615,17 +611,17 @@ class Session : public PBD::StatefulDestructible /* source management */ struct import_status : public InterThreadInfo { - string doing_what; + string doing_what; - /* control info */ - uint32_t total; - SrcQuality quality; - volatile bool freeze; - std::vector<Glib::ustring> paths; - bool replace_existing_source; + /* control info */ + uint32_t total; + SrcQuality quality; + volatile bool freeze; + std::vector<Glib::ustring> paths; + bool replace_existing_source; - /* result */ - SourceList sources; + /* result */ + SourceList sources; }; void import_audiofiles (import_status&); @@ -728,8 +724,8 @@ class Session : public PBD::StatefulDestructible /* flattening stuff */ - boost::shared_ptr<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end, bool overwrite, vector<boost::shared_ptr<Source> >&, - InterThreadInfo& wot); + boost::shared_ptr<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end, + bool overwrite, vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot); int freeze (InterThreadInfo&); /* session-wide solo/mute/rec-enable */ @@ -946,21 +942,14 @@ class Session : public PBD::StatefulDestructible gain_t* gain_automation_buffer () const { return _gain_automation_buffer; } pan_t** pan_automation_buffer () const { return _pan_automation_buffer; } - /* buffers for conversion */ - enum RunContext { - ButlerContext = 0, - TransportContext, - ExportContext - }; - /* VST support */ static long vst_callback (AEffect* effect, - long opcode, - long index, - long value, - void* ptr, - float opt); + long opcode, + long index, + long value, + void* ptr, + float opt); static sigc::signal<void> SendFeedback; @@ -971,8 +960,6 @@ class Session : public PBD::StatefulDestructible void add_controllable (boost::shared_ptr<PBD::Controllable>); void remove_controllable (PBD::Controllable*); - /* metadata */ - SessionMetadata & metadata () { return *_metadata; } protected: @@ -1208,12 +1195,12 @@ class Session : public PBD::StatefulDestructible inline bool transport_work_requested() const { return g_atomic_int_get(&butler_should_do_transport_work); } struct ButlerRequest { - enum Type { - Wake, - Run, - Pause, - Quit - }; + enum Type { + Wake, + Run, + Pause, + Quit + }; }; enum PostTransportWork { @@ -1235,14 +1222,15 @@ class Session : public PBD::StatefulDestructible }; static const PostTransportWork ProcessCannotProceedMask = - PostTransportWork (PostTransportInputChange| - PostTransportSpeed| - PostTransportReverse| - PostTransportCurveRealloc| - PostTransportScrub| - PostTransportAudition| - PostTransportLocate| - PostTransportStop); + PostTransportWork ( + PostTransportInputChange| + PostTransportSpeed| + PostTransportReverse| + PostTransportCurveRealloc| + PostTransportScrub| + PostTransportAudition| + PostTransportLocate| + PostTransportStop); PostTransportWork post_transport_work; @@ -1397,15 +1385,11 @@ class Session : public PBD::StatefulDestructible bool process_can_proceed() const { return !(post_transport_work & ProcessCannotProceedMask); } struct MIDIRequest { - - enum Type { - PortChange, - Quit - }; - - Type type; - - MIDIRequest () {} + enum Type { + PortChange, + Quit + }; + Type type; }; Glib::Mutex midi_lock; @@ -1587,18 +1571,18 @@ class Session : public PBD::StatefulDestructible /* S/W RAID */ struct space_and_path { - uint32_t blocks; /* 4kB blocks */ - string path; + uint32_t blocks; /* 4kB blocks */ + string path; - space_and_path() { - blocks = 0; - } + space_and_path() { + blocks = 0; + } }; struct space_and_path_ascending_cmp { - bool operator() (space_and_path a, space_and_path b) { - return a.blocks > b.blocks; - } + bool operator() (space_and_path a, space_and_path b) { + return a.blocks > b.blocks; + } }; void setup_raid_path (string path); @@ -1647,36 +1631,36 @@ class Session : public PBD::StatefulDestructible /* click track */ struct Click { - nframes_t start; - nframes_t duration; - nframes_t offset; - const Sample *data; + nframes_t start; + nframes_t duration; + nframes_t offset; + const Sample *data; - Click (nframes_t s, nframes_t d, const Sample *b) - : start (s), duration (d), data (b) { offset = 0; } + Click (nframes_t s, nframes_t d, const Sample *b) + : start (s), duration (d), data (b) { offset = 0; } - void *operator new(size_t ignored) { - return pool.alloc (); - }; + void *operator new(size_t ignored) { + return pool.alloc (); + }; - void operator delete(void *ptr, size_t size) { - pool.release (ptr); - } + void operator delete(void *ptr, size_t size) { + pool.release (ptr); + } private: - static Pool pool; + static Pool pool; }; typedef list<Click*> Clicks; - Clicks clicks; - bool _clicking; + Clicks clicks; + bool _clicking; boost::shared_ptr<IO> _click_io; - Sample* click_data; - Sample* click_emphasis_data; - nframes_t click_length; - nframes_t click_emphasis_length; - mutable Glib::RWLock click_lock; + Sample* click_data; + Sample* click_emphasis_data; + nframes_t click_length; + nframes_t click_emphasis_length; + mutable Glib::RWLock click_lock; static const Sample default_click[]; static const nframes_t default_click_length; @@ -1711,11 +1695,11 @@ class Session : public PBD::StatefulDestructible /* VST support */ long _vst_callback (VSTPlugin*, - long opcode, - long index, - long value, - void* ptr, - float opt); + long opcode, + long index, + long value, + void* ptr, + float opt); /* number of hardware ports we're using, based on max (requested,available) @@ -1730,7 +1714,6 @@ class Session : public PBD::StatefulDestructible uint32_t n_physical_midi_outputs; uint32_t n_physical_midi_inputs; - int find_all_sources (std::string path, std::set<std::string>& result); int find_all_sources_across_snapshots (std::set<std::string>& result, bool exclude_this_snapshot); @@ -1754,13 +1737,9 @@ class Session : public PBD::StatefulDestructible static bool _disable_all_loaded_plugins; - /* Metadata */ - SessionMetadata * _metadata; - /* used in ::audible_frame() */ - - mutable bool have_looped; + mutable bool have_looped; ///< Used in ::audible_frame(*) }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index b524c5d587..566153d02f 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -29,6 +29,7 @@ class Session; class Diskstream; class Playlist; class RouteGroup; +class Region; class Track : public Route { diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 125c8569a8..f98b3d993a 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -378,6 +378,12 @@ namespace ARDOUR { LV2, VST }; + + enum RunContext { + ButlerContext = 0, + TransportContext, + ExportContext + }; enum SlaveSource { None = 0, |