initial (incomplete) framework for DiskIOPoint manipulation
This commit is contained in:
parent
03e99e9866
commit
dc4f730ac9
|
@ -740,6 +740,8 @@ private:
|
|||
framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
|
||||
|
||||
void setup_invisible_processors ();
|
||||
virtual void setup_invisible_processors_oh_children_of_mine (ProcessorList&) {}
|
||||
|
||||
void unpan ();
|
||||
|
||||
void set_plugin_state_dir (boost::weak_ptr<Processor>, const std::string&);
|
||||
|
|
|
@ -185,6 +185,8 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
void adjust_playback_buffering ();
|
||||
void adjust_capture_buffering ();
|
||||
|
||||
void set_disk_io_position (DiskIOPoint);
|
||||
|
||||
PBD::Signal0<void> FreezeChange;
|
||||
PBD::Signal0<void> PlaylistChanged;
|
||||
PBD::Signal0<void> SpeedChanged;
|
||||
|
@ -198,6 +200,7 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
boost::shared_ptr<Playlist> _playlists[DataType::num_types];
|
||||
|
||||
MeterPoint _saved_meter_point;
|
||||
DiskIOPoint _disk_io_point;
|
||||
TrackMode _mode;
|
||||
bool _needs_butler;
|
||||
boost::shared_ptr<MonitorControl> _monitoring_control;
|
||||
|
@ -227,9 +230,9 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
|
||||
virtual void set_state_part_two () = 0;
|
||||
|
||||
FreezeRecord _freeze_record;
|
||||
XMLNode* pending_state;
|
||||
bool _destructive;
|
||||
FreezeRecord _freeze_record;
|
||||
XMLNode* pending_state;
|
||||
bool _destructive;
|
||||
|
||||
void maybe_declick (BufferSet&, framecnt_t, int);
|
||||
|
||||
|
@ -251,6 +254,7 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
|
||||
private:
|
||||
void parameter_changed (std::string const & p);
|
||||
void setup_invisible_processors_oh_children_of_mine (ProcessorList&);
|
||||
|
||||
std::string _diskstream_name;
|
||||
};
|
||||
|
|
|
@ -195,7 +195,7 @@ namespace ARDOUR {
|
|||
enum DiskIOPoint {
|
||||
DiskIOPreFader, /* after the trim control, but before other processors */
|
||||
DiskIOPostFader, /* before the main outs, after other processors */
|
||||
DiskIOCaustom, /* up to the user. Caveat Emptor! */
|
||||
DiskIOCustom, /* up to the user. Caveat Emptor! */
|
||||
};
|
||||
|
||||
enum MeterType {
|
||||
|
|
|
@ -58,6 +58,7 @@ DEFINE_ENUM_CONVERT(ARDOUR::BufferingPreset)
|
|||
DEFINE_ENUM_CONVERT(ARDOUR::AutoReturnTarget)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::MeterType)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::MeterPoint)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::DiskIOPoint)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::NoteMode)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::ChannelMode)
|
||||
DEFINE_ENUM_CONVERT(ARDOUR::MonitorChoice)
|
||||
|
|
|
@ -4649,6 +4649,8 @@ Route::setup_invisible_processors ()
|
|||
new_processors.push_front (_capturing_processor);
|
||||
}
|
||||
|
||||
setup_invisible_processors_oh_children_of_mine (new_processors);
|
||||
|
||||
_processors = new_processors;
|
||||
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
|
|
|
@ -55,6 +55,7 @@ using namespace PBD;
|
|||
Track::Track (Session& sess, string name, PresentationInfo::Flag flag, TrackMode mode, DataType default_type)
|
||||
: Route (sess, name, flag, default_type)
|
||||
, _saved_meter_point (_meter_point)
|
||||
, _disk_io_point (DiskIOPreFader)
|
||||
, _mode (mode)
|
||||
, _alignment_choice (Automatic)
|
||||
{
|
||||
|
@ -102,10 +103,9 @@ Track::init ()
|
|||
|
||||
use_new_playlist ();
|
||||
|
||||
/* ordering here is important, and needs to be generally maintained */
|
||||
|
||||
add_processor (_disk_writer, PreFader);
|
||||
add_processor (_disk_reader, PreFader);
|
||||
/* disk writer and reader processors will be added when Route calls
|
||||
* setup_invisible_processors_oh_children_of_mine ().
|
||||
*/
|
||||
|
||||
boost::shared_ptr<Route> rp (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
||||
boost::shared_ptr<Track> rt = boost::dynamic_pointer_cast<Track> (rp);
|
||||
|
@ -162,6 +162,7 @@ Track::state (bool full)
|
|||
root.add_child_nocopy (_record_enable_control->get_state ());
|
||||
|
||||
root.set_property (X_("saved-meter-point"), _saved_meter_point);
|
||||
root.set_property (X_("disk-io-point"), _disk_io_point);
|
||||
root.set_property (X_("alignment-choice"), _alignment_choice);
|
||||
|
||||
return root;
|
||||
|
@ -224,6 +225,10 @@ Track::set_state (const XMLNode& node, int version)
|
|||
_saved_meter_point = _meter_point;
|
||||
}
|
||||
|
||||
if (!node.get_property (X_("saved-meter-point"), _disk_io_point)) {
|
||||
_disk_io_point = DiskIOPreFader;
|
||||
}
|
||||
|
||||
AlignChoice ac;
|
||||
|
||||
if (node.get_property (X_("alignment-choice"), ac)) {
|
||||
|
@ -1512,3 +1517,30 @@ Track::use_captured_audio_sources (SourceList& srcs, CaptureInfos const & captur
|
|||
pl->set_capture_insertion_in_progress (false);
|
||||
_session.add_command (new StatefulDiffCommand (pl));
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
__attribute__((annotate("realtime")))
|
||||
#endif
|
||||
void
|
||||
Track::setup_invisible_processors_oh_children_of_mine (ProcessorList& new_processors)
|
||||
{
|
||||
ProcessorList::iterator insert_pos;
|
||||
|
||||
switch (_disk_io_point) {
|
||||
case DiskIOPreFader:
|
||||
insert_pos = find (new_processors.begin(), new_processors.end(), _trim);
|
||||
if (insert_pos != new_processors.end()) {
|
||||
insert_pos = new_processors.insert (insert_pos, _disk_writer);
|
||||
new_processors.insert (insert_pos, _disk_reader);
|
||||
}
|
||||
break;
|
||||
case DiskIOPostFader:
|
||||
insert_pos = find (new_processors.begin(), new_processors.end(), _main_outs);
|
||||
if (insert_pos != new_processors.end()) {
|
||||
insert_pos = new_processors.insert (insert_pos, _disk_writer);
|
||||
new_processors.insert (insert_pos, _disk_reader);
|
||||
}
|
||||
case DiskIOCustom:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user