21 #include "ardour/debug.h"
33 #include "ardour/utils.h"
42 :
Route (sess, name, flag, default_type)
43 , _saved_meter_point (_meter_point)
116 if (version >= 3000) {
138 if (prop->value() ==
X_(
"recenable")) {
146 if ((prop = node.
property (
X_(
"monitoring"))) != 0) {
152 if ((prop = node.
property (
X_(
"saved-meter-point"))) != 0) {
164 return state (
false);
223 bool will_record =
true;
296 if (p ==
"track-name-number") {
299 else if (p ==
"track-name-take") {
302 else if (p ==
"take-name") {
325 string diskstream_name =
"";
329 diskstream_name +=
"_";
333 char num[64], fmt[10];
335 snprintf(num,
sizeof(num), fmt, tracknumber);
336 diskstream_name += num;
337 diskstream_name +=
"_";
339 diskstream_name += str;
346 _diskstream->set_write_source_name (diskstream_name);
383 Glib::Threads::RWLock::ReaderLock lm (
_processor_lock, Glib::Threads::TRY_LOCK);
407 if (session_state_changing) {
422 _diskstream->check_record_status (start_frame, can_record);
450 _amp->apply_gain_automation (
false);
459 bool const track_rec =
_diskstream->record_enabled ();
462 bool const tape_machine_mode =
Config->get_tape_machine_mode ();
463 bool no_meter =
false;
471 if (!auto_input && !track_rec) {
474 else if (tape_machine_mode && !track_rec && auto_input) {
477 else if (!software_monitor && tape_machine_mode && !track_rec) {
480 else if (!software_monitor && !tape_machine_mode && !track_rec && !auto_input) {
486 _meter->run (bufs, 0, 0, nframes,
true);
489 _input->process_input (
_meter, start_frame, end_frame, nframes);
502 _meter->run (bufs, start_frame, end_frame, nframes,
true);
505 passthru (bufs, start_frame, end_frame, nframes,
false);
521 Glib::Threads::RWLock::ReaderLock lm (
_processor_lock, Glib::Threads::TRY_LOCK);
540 _amp->apply_gain_automation(
false);
549 need_butler =
_diskstream->commit (playback_distance);
613 list<boost::shared_ptr<Source> > &
682 return _diskstream->can_internal_playback_seek (p);
749 _diskstream->transport_stopped_wallclock (n, t, g);
911 bool const track_rec =
_diskstream->record_enabled ();
914 bool const tape_machine_mode =
Config->get_tape_machine_mode ();
931 if (!session_rec && roll && auto_input) {
939 if (tape_machine_mode) {
945 if (!roll && auto_input) {
1023 (*i)->monitoring_changed ();
bool pending_overwrite() const
framepos_t get_capture_start_frame(uint32_t n=0) const
bool transport_rolling() const
void set_align_choice(AlignChoice, bool force=false)
double get_value(void) const
std::string steal_write_source_name()
void set_record_enabled(bool yn, void *src)
ARDOUR::Session & _session
PBD::Signal0< void > SpeedChanged
RecEnableControl(boost::shared_ptr< Track > t)
void parameter_changed(std::string const &p)
FreezeRecord _freeze_record
const std::string & value() const
void use_new_diskstream()
bool get_record_enabled() const
void transport_looped(framepos_t)
double transport_speed() const
LIBARDOUR_API uint64_t Destruction
virtual int set_state(const XMLNode &, int version)
PBD::Signal0< void > RecordEnableChanged
void set_latency_compensation(framecnt_t)
Session & session() const
boost::shared_ptr< Amp > _amp
void flush_buffers(framecnt_t nframes)
MeterState metering_state() const
bool actively_recording() const
int silent_roll(pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool &need_butler)
void maybe_declick(BufferSet &, framecnt_t, int)
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
int overwrite_existing_buffers()
void adjust_capture_buffering()
const std::string & name() const
virtual void set_block_size(pframes_t nframes)
void diskstream_playlist_changed()
float capture_buffer_load() const
void reset_write_sources(bool, bool force=false)
void passthru(BufferSet &, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, int declick)
PBD::Signal0< void > PlaylistChanged
virtual void set_monitoring(MonitorChoice)
framecnt_t get_captured_frames(uint32_t n=0) const
void set_orig_track_id(const PBD::ID &did)
MeterPoint _saved_meter_point
framepos_t current_capture_end() const
meter the input IO, regardless of what is going through the route
void non_realtime_input_change()
const XMLNodeList & children(const std::string &str=std::string()) const
bool _have_internal_generator
ProcessorList _processors
bool set_name(const std::string &str)
void silence_unlocked(framecnt_t)
SessionConfiguration config
virtual int no_roll(pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing)
meter what is going through the route
AlignChoice alignment_choice() const
PBD::Signal0< void > AlignmentStyleChanged
bool using_diskstream_id(PBD::ID) const
boost::shared_ptr< PeakMeter > _meter
std::list< XMLNode * > XMLNodeList
void request_input_monitoring(bool)
PBD::Signal0< void > AlignmentStyleChanged
virtual void non_realtime_locate(framepos_t)
int64_t track_number() const
void non_realtime_set_speed()
RouteGroup * _route_group
virtual void set_latency_compensation(framecnt_t)
void prepare_to_stop(framepos_t, framepos_t)
boost::shared_ptr< RecEnableControl > _rec_enable_control
PBD::Signal0< void > track_number_changed
XMLProperty * property(const char *)
LIBARDOUR_API RCConfiguration * Config
boost::shared_ptr< IO > _output
#define string_2_enum(str, e)
void set_capture_offset()
std::vector< FreezeRecordProcessorInfo * > processor_info
int use_playlist(boost::shared_ptr< Playlist >)
int seek(framepos_t, bool complete_refill=false)
void set_meter_point(MeterPoint, bool force=false)
void set_block_size(pframes_t)
int internal_playback_seek(framecnt_t)
framepos_t transport_frame() const
ChanCount n_outputs() const
bool is_recenable() const
std::list< boost::shared_ptr< Source > > & last_capture_sources()
PBD::Signal0< void > SpeedChanged
boost::shared_ptr< Playlist > playlist()
void diskstream_record_enable_changed()
#define DEBUG_TRACE(bits, str)
bool record_enabled() const
void ensure_input_monitoring(bool)
void transport_stopped_wallclock(struct tm &, time_t, bool)
MonitorChoice _monitoring
void set_pending_overwrite(bool)
LIBARDOUR_API XMLNode * find_named_node(const XMLNode &node, std::string name)
void passthru_silence(framepos_t start_frame, framepos_t end_frame, pframes_t nframes, int declick)
int do_flush(RunContext, bool force=false)
PBD::Property< std::string > _name
void apply(void(Track::*func)(T, void *), T val, void *src)
PBD::Signal1< void, std::string > ParameterChanged
void set_list(boost::shared_ptr< Evoral::ControlList >)
PBD::Signal0< void > PlaylistChanged
static void declick(BufferSet &bufs, framecnt_t nframes, int dir)
void diskstream_alignment_style_changed()
static const std::string xml_node_name
virtual boost::shared_ptr< Diskstream > diskstream_factory(XMLNode const &)=0
XMLProperty * add_property(const char *name, const std::string &value)
BufferSet & get_route_buffers(ChanCount count=ChanCount::ZERO, bool silence=true)
boost::shared_ptr< IO > _input
void prep_record_enabled(bool yn, void *src)
MonitorState monitoring_state() const
MonitorChoice monitoring_choice() const
void add_child_nocopy(XMLNode &)
virtual int set_state(const XMLNode &, int version)
int can_internal_playback_seek(framecnt_t)
pframes_t get_block_size() const
XMLNode & state(bool full)
virtual boost::shared_ptr< Diskstream > create_diskstream()=0
virtual int do_refill_with_alloc()=0
uint32_t track_number_decimals() const
void increment_port_buffer_offset(pframes_t)
void adjust_playback_buffering()
framecnt_t check_initial_delay(framecnt_t nframes, framepos_t &)
PBD::Signal0< void > MonitoringChanged
float playback_buffer_load() const
std::string _diskstream_name
bool realtime_set_speed(double, bool)
PBD::Signal0< void > RecordEnableChanged
void non_realtime_locate(framepos_t)
virtual XMLNode & state(bool)
boost::shared_ptr< SessionPlaylists > playlists
FreezeState freeze_state() const
AlignStyle alignment_style() const
Glib::Threads::RWLock _processor_lock
int save_state(std::string snapshot_name, bool pending=false, bool switch_to_snapshot=false, bool template_only=false)
boost::shared_ptr< Diskstream > _diskstream
bool set_name(const std::string &str)
virtual void set_diskstream(boost::shared_ptr< Diskstream >)
virtual void set_block_size(pframes_t)=0
XMLNodeList::const_iterator XMLNodeConstIterator
void fill_buffers_with_input(BufferSet &bufs, boost::shared_ptr< IO > io, pframes_t nframes)
boost::shared_ptr< Playlist > playlist()
BufferSet & get_silent_buffers(ChanCount count=ChanCount::ZERO)
virtual int roll(pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool &need_butler)=0
ChanCount n_process_buffers()
framepos_t current_capture_start() const
std::string string_compose(const std::string &fmt, const T1 &o1)
void diskstream_speed_changed()
void set_align_style(AlignStyle, bool force=false)