diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-15 21:40:17 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-15 21:40:17 +0000 |
commit | f07ca6397f5699e4dc4ec1e360f9e263d8a0d9ad (patch) | |
tree | 67d6fd1dea33e5adc8f84886dfeeaa46ca84051e /libs/ardour/ardour | |
parent | cfaf6ff7e3726bdfa97516fe683dc3cf93c62223 (diff) |
radically rethink export/bounce/freeze code design. probably not 100% done by freeze+unfreeze now work and behave sensibly w.r.t. processors that do routing
git-svn-id: svn://localhost/ardour2/branches/3.0@11701 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audio_track.h | 11 | ||||
-rw-r--r-- | libs/ardour/ardour/audioregion.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/delivery.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/import_status.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/io_processor.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_stretch.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_track.h | 15 | ||||
-rw-r--r-- | libs/ardour/ardour/pitch.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/process_thread.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/processor.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/rb_effect.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/stretch.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/track.h | 14 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 22 |
15 files changed, 36 insertions, 44 deletions
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 4ae5b59fc8..ada58e8ebe 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -20,6 +20,7 @@ #ifndef __ardour_audio_track_h__ #define __ardour_audio_track_h__ +#include "ardour/interthread_info.h" #include "ardour/track.h" namespace ARDOUR { @@ -49,20 +50,20 @@ class AudioTrack : public Track return DataType::AUDIO; } - int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, bool enable_processing = true); - void freeze_me (InterThreadInfo&); void unfreeze (); + bool bounceable (boost::shared_ptr<Processor>, bool include_endpoint) const; boost::shared_ptr<Region> bounce (InterThreadInfo&); - boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing); + boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, + boost::shared_ptr<Processor> endpoint, bool include_endpoint); + int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, + boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export); int set_state (const XMLNode&, int version); boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0); - bool bounceable () const; - protected: boost::shared_ptr<AudioDiskstream> audio_diskstream () const; XMLNode& state (bool full); diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index a1e537ebd0..c1476f69a4 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -29,6 +29,7 @@ #include "ardour/ardour.h" #include "ardour/automatable.h" #include "ardour/automation_list.h" +#include "ardour/interthread_info.h" #include "ardour/logcurve.h" #include "ardour/region.h" diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 89dff8850e..cb2f37d1f0 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -52,6 +52,8 @@ public: static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert; } + bool does_routing() const { return true; } + /* Delivery to an existing output */ Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role); diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index 9beb70f2f0..1753abe655 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -25,6 +25,7 @@ #include <stdint.h> +#include "ardour/interthread_info.h" #include "ardour/types.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 4385b1c041..574cef9993 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -52,6 +52,8 @@ class IOProcessor : public Processor bool set_name (const std::string& str); + bool does_routing() const { return true; } + virtual ChanCount natural_output_streams() const; virtual ChanCount natural_input_streams () const; diff --git a/libs/ardour/ardour/midi_stretch.h b/libs/ardour/ardour/midi_stretch.h index 9b4fba80ce..42b201b55a 100644 --- a/libs/ardour/ardour/midi_stretch.h +++ b/libs/ardour/ardour/midi_stretch.h @@ -21,6 +21,7 @@ #define __ardour_midi_stretch_h__ #include "ardour/filter.h" +#include "ardour/timefx_request.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 803f84f387..45055a0c3d 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -20,6 +20,7 @@ #ifndef __ardour_midi_track_h__ #define __ardour_midi_track_h__ +#include "ardour/interthread_info.h" #include "ardour/track.h" #include "ardour/midi_ring_buffer.h" #include "ardour/midi_state_tracker.h" @@ -54,15 +55,15 @@ public: return DataType::MIDI; } - int export_stuff (BufferSet& bufs, framecnt_t nframes, framepos_t end_frame); - void freeze_me (InterThreadInfo&); void unfreeze (); + bool bounceable (boost::shared_ptr<Processor>, bool) const { return false; } boost::shared_ptr<Region> bounce (InterThreadInfo&); - boost::shared_ptr<Region> bounce_range ( - framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing - ); + boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, + boost::shared_ptr<Processor> endpoint, bool include_endpoint); + int export_stuff (BufferSet& bufs, framecnt_t nframes, framepos_t end_frame, + boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export); int set_state (const XMLNode&, int version); @@ -100,10 +101,6 @@ public: uint16_t get_channel_mask (); boost::shared_ptr<MidiPlaylist> midi_playlist (); - bool bounceable () const { - return false; - } - PBD::Signal1<void, boost::weak_ptr<MidiSource> > DataRecorded; boost::shared_ptr<MidiBuffer> get_gui_feed_buffer () const; diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h index 3bb179127e..961609938c 100644 --- a/libs/ardour/ardour/pitch.h +++ b/libs/ardour/ardour/pitch.h @@ -25,6 +25,7 @@ #endif #include "ardour/filter.h" +#include "ardour/timefx_request.h" namespace ARDOUR { class AudioRegion; diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index fe2f258285..36d8b8d3a7 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -9,6 +9,7 @@ namespace ARDOUR { class ThreadBuffers; +class BufferSet; class ProcessThread { diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index fe23d6fdde..d497f56dd3 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -58,6 +58,8 @@ class Processor : public SessionObject, public Automatable, public Latent bool active () const { return _pending_active; } + virtual bool does_routing() const { return false; } + bool get_next_ab_is_active () const { return _next_ab_is_active; } void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; } diff --git a/libs/ardour/ardour/rb_effect.h b/libs/ardour/ardour/rb_effect.h index 84c9bce53c..1d36f31332 100644 --- a/libs/ardour/ardour/rb_effect.h +++ b/libs/ardour/ardour/rb_effect.h @@ -21,6 +21,7 @@ #define __ardour_rbeffect_h__ #include "ardour/filter.h" +#include "ardour/timefx_request.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 001e20ec6f..adb000c615 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -52,6 +52,7 @@ #include "ardour/ardour.h" #include "ardour/chan_count.h" #include "ardour/delivery.h" +#include "ardour/interthread_info.h" #include "ardour/rc_configuration.h" #include "ardour/session_configuration.h" #include "ardour/session_event.h" @@ -607,8 +608,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi /* flattening stuff */ boost::shared_ptr<Region> write_one_track (AudioTrack&, framepos_t start, framepos_t end, - bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot, - bool enable_processing = true); + bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot, + boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export); int freeze_all (InterThreadInfo&); /* session-wide solo/mute/rec-enable */ diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h index 56a2555531..066ed7861a 100644 --- a/libs/ardour/ardour/stretch.h +++ b/libs/ardour/ardour/stretch.h @@ -25,6 +25,7 @@ #endif #include "ardour/filter.h" +#include "ardour/timefx_request.h" #ifdef USE_RUBBERBAND diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 9901d93923..587a8dcd1b 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -21,6 +21,7 @@ #include <boost/shared_ptr.hpp> +#include "ardour/interthread_info.h" #include "ardour/route.h" #include "ardour/public_diskstream.h" @@ -87,8 +88,14 @@ class Track : public Route, public PublicDiskstream virtual void freeze_me (InterThreadInfo&) = 0; virtual void unfreeze () = 0; + /** @return true if the track can be bounced, or false otherwise. + */ + virtual bool bounceable (boost::shared_ptr<Processor> endpoint, bool include_endpoint) const = 0; virtual boost::shared_ptr<Region> bounce (InterThreadInfo&) = 0; - virtual boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing = true) = 0; + virtual boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, + boost::shared_ptr<Processor> endpoint, bool include_endpoint) = 0; + virtual int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, + boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export) = 0; XMLNode& get_state(); XMLNode& get_template(); @@ -104,11 +111,6 @@ class Track : public Route, public PublicDiskstream void set_block_size (pframes_t); - /** @return true if the track can be bounced, or false if it cannot because - * it has more outputs than diskstream channels. - */ - virtual bool bounceable () const = 0; - /* PublicDiskstream interface */ boost::shared_ptr<Playlist> playlist (); void request_jack_monitors_input (bool); diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index c34869bc2b..b6ab07c743 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -422,15 +422,6 @@ namespace ARDOUR { AutoConnectMaster = 0x2 }; - struct InterThreadInfo { - InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {} - - volatile bool done; - volatile bool cancel; - volatile float progress; - pthread_t thread; - }; - enum SampleFormat { FormatFloat = 0, FormatInt24, @@ -500,19 +491,6 @@ namespace ARDOUR { SrcFastest }; - struct TimeFXRequest : public InterThreadInfo { - TimeFXRequest() - : time_fraction(0), pitch_fraction(0), - quick_seek(false), antialias(false), opts(0) {} - float time_fraction; - float pitch_fraction; - /* SoundTouch */ - bool quick_seek; - bool antialias; - /* RubberBand */ - int opts; // really RubberBandStretcher::Options - }; - typedef std::list<framepos_t> AnalysisFeatureList; typedef std::list<boost::shared_ptr<Route> > RouteList; |