boost::shared_ptr<AudioDiskstream> audio_diskstream() const;
- int use_diskstream (std::string name);
- int use_diskstream (const PBD::ID& id);
+ void use_new_diskstream ();
+ void set_diskstream (boost::shared_ptr<Diskstream>);
int export_stuff (BufferSet& bufs, sframes_t start_frame, nframes_t nframes, bool enable_processing = true);
int _set_state (const XMLNode&, int, bool call_base);
private:
- int set_diskstream (boost::shared_ptr<AudioDiskstream>, void *);
int deprecated_use_diskstream_connections ();
- void use_new_diskstream ();
void set_state_part_two ();
void set_state_part_three ();
};
Auditioner (Session&);
~Auditioner ();
+ int init ();
+
void audition_region (boost::shared_ptr<Region>);
ARDOUR::AudioPlaylist& prepare_playlist ();
int play_audition (nframes_t nframes);
void cancel_audition () {
- g_atomic_int_set (&_active, 0);
+ g_atomic_int_set (&_auditioning, 0);
}
- bool active() const { return g_atomic_int_get (&_active); }
+ bool auditioning() const { return g_atomic_int_get (&_auditioning); }
private:
boost::shared_ptr<AudioRegion> the_region;
nframes_t current_frame;
- mutable gint _active;
+ mutable gint _auditioning;
Glib::Mutex lock;
nframes_t length;
boost::shared_ptr<MidiDiskstream> midi_diskstream() const;
- int use_diskstream (string name);
- int use_diskstream (const PBD::ID& id);
+ void use_new_diskstream ();
+ void set_diskstream (boost::shared_ptr<Diskstream>);
void set_latency_delay (nframes_t);
private:
void write_out_of_band_data (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
- int set_diskstream (boost::shared_ptr<MidiDiskstream> ds);
- void use_new_diskstream ();
void set_state_part_two ();
void set_state_part_three ();
Route (Session&, std::string name, Flag flags = Flag(0), DataType default_type = DataType::AUDIO);
virtual ~Route();
+ virtual int init ();
+
boost::shared_ptr<IO> input() const { return _input; }
boost::shared_ptr<IO> output() const { return _output; }
virtual ChanCount input_streams () const;
protected:
-
virtual XMLNode& state(bool);
+ int configure_processors (ProcessorStreams*);
+
void passthru_silence (sframes_t start_frame, sframes_t end_frame,
nframes_t nframes, int declick);
boost::shared_ptr<PeakMeter> _meter;
private:
- void init ();
int _set_state_2X (const XMLNode&, int);
void set_processor_state_2X (XMLNodeList const &, int);
bool _in_configure_processors;
- int configure_processors (ProcessorStreams*);
int configure_processors_unlocked (ProcessorStreams*);
bool add_processor_from_xml (const XMLNode&, ProcessorList::iterator iter);
{
public:
Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO);
-
virtual ~Track ();
+ int init ();
+
bool set_name (const std::string& str);
TrackMode mode () const { return _mode; }
boost::shared_ptr<Diskstream> diskstream() const { return _diskstream; }
- virtual int use_diskstream (std::string name) = 0;
- virtual int use_diskstream (const PBD::ID& id) = 0;
+ virtual void use_new_diskstream () = 0;
+ virtual void set_diskstream (boost::shared_ptr<Diskstream>) = 0;
nframes_t update_total_latency();
void set_latency_delay (nframes_t);
}
}
-
if (can_record && !_last_capture_regions.empty()) {
_last_capture_regions.clear ();
}
_speed = _target_speed;
- }
+ }
ret = 0;
AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
: Track (sess, name, flag, mode)
{
- use_new_diskstream ();
}
AudioTrack::~AudioTrack ()
_session.add_diskstream (ds);
- set_diskstream (boost::dynamic_pointer_cast<AudioDiskstream> (ds), this);
+ set_diskstream (ds);
+}
+
+void
+AudioTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
+{
+ _diskstream = ds;
+ _diskstream->set_route (*this);
+ _diskstream->set_destructive (_mode == Destructive);
+ _diskstream->set_non_layered (_mode == NonLayered);
+
+ if (audio_diskstream()->deprecated_io_node) {
+
+ if (!IO::connecting_legal) {
+ IO::ConnectingLegal.connect_same_thread (*this, boost::bind (&AudioTrack::deprecated_use_diskstream_connections, this));
+ } else {
+ deprecated_use_diskstream_connections ();
+ }
+ }
+
+ _diskstream->set_record_enabled (false);
+ _diskstream->monitor_input (false);
+
+ DiskstreamChanged (); /* EMIT SIGNAL */
+}
+
+boost::shared_ptr<AudioDiskstream>
+AudioTrack::audio_diskstream() const
+{
+ return boost::dynamic_pointer_cast<AudioDiskstream>(_diskstream);
}
int
return 0;
}
-int
-AudioTrack::set_diskstream (boost::shared_ptr<AudioDiskstream> ds, void * /*src*/)
-{
- _diskstream = ds;
- _diskstream->set_route (*this);
- _diskstream->set_destructive (_mode == Destructive);
- _diskstream->set_non_layered (_mode == NonLayered);
-
- if (audio_diskstream()->deprecated_io_node) {
-
- if (!IO::connecting_legal) {
- IO::ConnectingLegal.connect_same_thread (*this, boost::bind (&AudioTrack::deprecated_use_diskstream_connections, this));
- } else {
- deprecated_use_diskstream_connections ();
- }
- }
-
- _diskstream->set_record_enabled (false);
- _diskstream->monitor_input (false);
-
- DiskstreamChanged (); /* EMIT SIGNAL */
-
- return 0;
-}
-
-int
-AudioTrack::use_diskstream (string name)
-{
- boost::shared_ptr<AudioDiskstream> dstream;
-
- if ((dstream = boost::dynamic_pointer_cast<AudioDiskstream>(_session.diskstream_by_name (name))) == 0) {
- error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), name) << endmsg;
- return -1;
- }
-
- return set_diskstream (dstream, this);
-}
-
-int
-AudioTrack::use_diskstream (const PBD::ID& id)
-{
- boost::shared_ptr<AudioDiskstream> dstream;
-
- if ((dstream = boost::dynamic_pointer_cast<AudioDiskstream> (_session.diskstream_by_id (id))) == 0) {
- error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), id) << endmsg;
- return -1;
- }
-
- return set_diskstream (dstream, this);
-}
-
-boost::shared_ptr<AudioDiskstream>
-AudioTrack::audio_diskstream() const
-{
- return boost::dynamic_pointer_cast<AudioDiskstream>(_diskstream);
-}
-
int
AudioTrack::set_state (const XMLNode& node, int version)
{
_mode = Normal;
}
- if ((prop = node.property ("diskstream-id")) == 0) {
-
- /* some old sessions use the diskstream name rather than the ID */
-
- if ((prop = node.property ("diskstream")) == 0) {
- fatal << _("programming error: AudioTrack given state without diskstream!") << endmsg;
- /*NOTREACHED*/
- return -1;
- }
-
- if (use_diskstream (prop->value())) {
- return -1;
- }
-
- } else {
-
- PBD::ID id (prop->value());
- PBD::ID zero ("0");
-
- /* this wierd hack is used when creating tracks from a template. there isn't
- a particularly good time to interpose between setting the first part of
- the track state (notably Route::set_state() and the track mode), and the
- second part (diskstream stuff). So, we have a special ID for the diskstream
- that means "you should create a new diskstream here, not look for
- an old one.
- */
-
- if (id == zero) {
- use_new_diskstream ();
- } else if (use_diskstream (id)) {
- return -1;
- }
- }
-
-
XMLNodeList nlist;
XMLNodeConstIterator niter;
XMLNode *child;
/* copy the diskstream data to all output buffers */
- size_t limit = _input->n_ports().n_audio();
+ size_t limit = input_streams ().n_audio();
BufferSet& bufs = _session.get_scratch_buffers ();
const size_t blimit = bufs.count().n_audio();
- if (limit == 0) {
- /* no inputs, try for diskstream channel count */
- limit = diskstream->n_channels().n_audio();
- }
-
uint32_t n;
uint32_t i;
- cerr << _name << " Input = " << _input->n_ports()
- << " Output " << _output->n_ports ()
- << " limit " << limit
- << " blimit " << blimit
- << endl;
-
if (limit > blimit) {
/* example case: auditioner configured for stereo output,
Auditioner::Auditioner (Session& s)
: AudioTrack (s, "auditioner", Route::Hidden)
{
+}
+
+int
+Auditioner::init ()
+{
+ if (Track::init ()) {
+ return -1;
+ }
+
string left = _session.config.get_auditioner_output_left();
string right = _session.config.get_auditioner_output_right();
if ((left.length() == 0) && (right.length() == 0)) {
warning << _("no outputs available for auditioner - manual connection required") << endmsg;
- return;
+ return -1;
}
_main_outs->defer_pan_reset ();
- cerr << "Aud connect " << left << " + " << right << endl;
-
if (left.length()) {
_output->add_port (left, this, DataType::AUDIO);
}
if (right.length()) {
- audio_diskstream()->add_channel (1);
_output->add_port (right, this, DataType::AUDIO);
}
_output->changed.connect_same_thread (*this, boost::bind (&Auditioner::output_changed, this, _1, _2));
the_region.reset ((AudioRegion*) 0);
- g_atomic_int_set (&_active, 0);
+ g_atomic_int_set (&_auditioning, 0);
+
+ return 0;
}
Auditioner::~Auditioner ()
void
Auditioner::audition_current_playlist ()
{
- if (g_atomic_int_get (&_active)) {
+ if (g_atomic_int_get (&_auditioning)) {
/* don't go via session for this, because we are going
to remain active.
*/
_main_outs->panner()->reset (n_outputs().n_audio(), _diskstream->n_channels().n_audio());
- g_atomic_int_set (&_active, 1);
+ g_atomic_int_set (&_auditioning, 1);
}
void
Auditioner::audition_region (boost::shared_ptr<Region> region)
{
- if (g_atomic_int_get (&_active)) {
+ if (g_atomic_int_get (&_auditioning)) {
/* don't go via session for this, because we are going
to remain active.
*/
audio_diskstream()->remove_channel (_diskstream->n_channels().n_audio() - the_region->n_channels());
}
+ ProcessorStreams ps;
+ if (configure_processors (&ps)) {
+ error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"),
+ _diskstream->n_channels()) << endmsg;
+ return;
+ }
+
/* force a panner reset now that we have all channels */
_main_outs->reset_panner();
_diskstream->seek (offset);
current_frame = offset;
- g_atomic_int_set (&_active, 1);
+ g_atomic_int_set (&_auditioning, 1);
}
int
nframes_t this_nframes;
int ret;
- if (g_atomic_int_get (&_active) == 0) {
+ if (g_atomic_int_get (&_auditioning) == 0) {
silence (nframes);
return 0;
}
_diskstream->prepare ();
- cerr << "Auditioner rolls, gain = " << gain_control()->get_value() << endl;
-
if ((ret = roll (this_nframes, current_frame, current_frame + nframes, false, false, false)) != 0) {
- cerr << "\troll failed\n";
silence (nframes);
return ret;
}
}
} else {
+
// Do a 1:1 copy of data to output ports
if (bufs.count().n_audio() > 0 && ports.count().n_audio () > 0) {
, _default_channel (0)
, _midi_thru (true)
{
- use_new_diskstream ();
-
- _declickable = true;
- _freeze_record.state = NoFreeze;
- _saved_meter_point = _meter_point;
- _mode = mode;
}
MidiTrack::~MidiTrack ()
set_diskstream (boost::dynamic_pointer_cast<MidiDiskstream> (ds));
}
-int
-MidiTrack::set_diskstream (boost::shared_ptr<MidiDiskstream> ds)
+void
+MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
{
_diskstream = ds;
_diskstream->set_route (*this);
//_diskstream->monitor_input (false);
DiskstreamChanged (); /* EMIT SIGNAL */
-
- return 0;
-}
-
-int
-MidiTrack::use_diskstream (string name)
-{
- boost::shared_ptr<MidiDiskstream> dstream;
-
- if ((dstream = boost::dynamic_pointer_cast<MidiDiskstream>(_session.diskstream_by_name (name))) == 0) {
- error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), name) << endmsg;
- return -1;
- }
-
- return set_diskstream (dstream);
-}
-
-int
-MidiTrack::use_diskstream (const PBD::ID& id)
-{
- boost::shared_ptr<MidiDiskstream> dstream;
-
- if ((dstream = boost::dynamic_pointer_cast<MidiDiskstream> (_session.diskstream_by_id (id))) == 0) {
- error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), id) << endmsg;
- return -1;
- }
-
- return set_diskstream (dstream);
}
boost::shared_ptr<MidiDiskstream>
set_default_channel ((uint8_t) atoi (prop->value()));
}
- if ((prop = node.property ("diskstream-id")) == 0) {
-
- /* some old sessions use the diskstream name rather than the ID */
-
- if ((prop = node.property ("diskstream")) == 0) {
- fatal << _("programming error: MidiTrack given state without diskstream!") << endmsg;
- /*NOTREACHED*/
- return -1;
- }
-
- if (use_diskstream (prop->value())) {
- return -1;
- }
-
- } else {
-
- PBD::ID id (prop->value());
- PBD::ID zero ("0");
-
- /* this wierd hack is used when creating tracks from a template. there isn't
- a particularly good time to interpose between setting the first part of
- the track state (notably Route::set_state() and the track mode), and the
- second part (diskstream stuff). So, we have a special ID for the diskstream
- that means "you should create a new diskstream here, not look for
- an old one.
- */
-
- if (id == zero) {
- use_new_diskstream ();
- } else if (use_diskstream (id)) {
- return -1;
- }
- }
-
XMLNodeList nlist;
XMLNodeConstIterator niter;
XMLNode *child;
Route::Route (Session& sess, string name, Flag flg, DataType default_type)
: SessionObject (sess, name)
, AutomatableControls (sess)
+ , _active (true)
+ , _initial_delay (0)
+ , _roll_delay (0)
, _flags (flg)
+ , _pending_declick (true)
+ , _meter_point (MeterPostFader)
+ , _phase_invert (0)
+ , _self_solo (false)
+ , _soloed_by_others (0)
+ , _solo_isolated (0)
+ , _denormal_protection (false)
+ , _recordable (true)
+ , _silent (false)
+ , _declickable (false)
, _solo_control (new SoloControllable (X_("solo"), *this))
, _mute_control (new MuteControllable (X_("mute"), *this))
, _mute_master (new MuteMaster (sess, name))
+ , _mute_points (MuteMaster::AllPoints)
+ , _have_internal_generator (false)
+ , _solo_safe (false)
, _default_type (default_type)
+ , _remote_control_id (0)
+ , _in_configure_processors (false)
+{
+ processor_max_streams.reset();
+ order_keys[N_("signal")] = order_key_cnt++;
+}
+int
+Route::init ()
{
- init ();
+ /* add standard controls */
+
+ _solo_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
+ _mute_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
+
+ add_control (_solo_control);
+ add_control (_mute_control);
+
+ /* input and output objects */
+
+ _input.reset (new IO (_session, _name, IO::Input, _default_type));
+ _output.reset (new IO (_session, _name, IO::Output, _default_type));
+
+ _input->changed.connect_same_thread (*this, boost::bind (&Route::input_change_handler, this, _1, _2));
+ _output->changed.connect_same_thread (*this, boost::bind (&Route::output_change_handler, this, _1, _2));
+
+ /* add amp processor */
+
+ _amp.reset (new Amp (_session, _mute_master));
+ add_processor (_amp, PostFader);
/* add standard processors other than amp (added by ::init()) */
/* now that we have _meter, its safe to connect to this */
Metering::Meter.connect_same_thread (*this, (boost::bind (&Route::meter, this)));
-}
-void
-Route::init ()
-{
- _self_solo = false;
- _soloed_by_others = 0;
- _solo_isolated = 0;
- _solo_safe = false;
- _active = true;
- processor_max_streams.reset();
- _recordable = true;
- order_keys[N_("signal")] = order_key_cnt++;
- _silent = false;
- _meter_point = MeterPostFader;
- _initial_delay = 0;
- _roll_delay = 0;
- _have_internal_generator = false;
- _declickable = false;
- _pending_declick = true;
- _remote_control_id = 0;
- _in_configure_processors = false;
- _mute_points = MuteMaster::AllPoints;
-
- _phase_invert = 0;
- _denormal_protection = false;
-
- /* add standard controls */
-
- _solo_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
- _mute_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
-
- add_control (_solo_control);
- add_control (_mute_control);
-
- /* input and output objects */
-
- _input.reset (new IO (_session, _name, IO::Input, _default_type));
- _output.reset (new IO (_session, _name, IO::Output, _default_type));
-
- _input->changed.connect_same_thread (*this, boost::bind (&Route::input_change_handler, this, _1, _2));
- _output->changed.connect_same_thread (*this, boost::bind (&Route::output_change_handler, this, _1, _2));
-
- /* add amp processor */
-
- _amp.reset (new Amp (_session, _mute_master));
- add_processor (_amp, PostFader);
+ return 0;
}
Route::~Route ()
<< endl;
}
assert (bufs.count() == (*i)->input_streams());
-
+
(*i)->run (bufs, start_frame, end_frame, nframes, *i != _processors.back());
bufs.set_count ((*i)->output_streams());
}
_silent = false;
- assert (bufs.available() >= _input->n_ports());
+ assert (bufs.available() >= input_streams());
if (_input->n_ports() == ChanCount::ZERO) {
silence (nframes);
}
- bufs.set_count (_input->n_ports());
+ bufs.set_count (input_streams());
- if (is_monitor() && _session.listening()) {
+ if (is_monitor() && _session.listening() && !_session.is_auditioning()) {
/* control/monitor bus ignores input ports when something is
feeding the listen "stream". data will "arrive" into the
ChanCount
Route::input_streams () const
{
- cerr << "!!!!!!!!!" << _name << " ::input_streams()\n";
return _input->n_ports ();
}
_in_configure_processors = true;
// Check each processor in order to see if we can configure as requested
- if (_name == "auditioner") {
- cerr << "AUD conf\n";
- }
ChanCount in = input_streams ();
ChanCount out;
list< pair<ChanCount,ChanCount> > configuration;
*/
try {
- auditioner.reset (new Auditioner (*this));
+ Auditioner* a = new Auditioner (*this);
+ if (a->init()) {
+ delete a;
+ throw failed_constructor();
+ }
+ a->use_new_diskstream ();
+ auditioner.reset (a);
}
catch (failed_constructor& err) {
try {
MidiTrack* mt = new MidiTrack (*this, track_name, Route::Flag (0), mode);
+
+ if (mt->init ()) {
+ delete mt;
+ goto failed;
+ }
+
+ mt->use_new_diskstream();
+
boost_debug_shared_ptr_mark_interesting (mt, "Track");
track = boost::shared_ptr<MidiTrack>(mt);
try {
AudioTrack* at = new AudioTrack (*this, track_name, Route::Flag (0), mode);
+
+ if (at->init ()) {
+ delete at;
+ goto failed;
+ }
+
+ at->use_new_diskstream();
+
boost_debug_shared_ptr_mark_interesting (at, "Track");
track = boost::shared_ptr<AudioTrack>(at);
try {
Route* rt = new Route (*this, bus_name, Route::Flag(0), DataType::AUDIO);
+
+ if (rt->init ()) {
+ delete rt;
+ goto failure;
+ }
+
boost_debug_shared_ptr_mark_interesting (rt, "Route");
shared_ptr<Route> bus (rt);
void
Session::cancel_audition ()
{
- if (auditioner->active()) {
+ if (auditioner->auditioning()) {
auditioner->cancel_audition ();
AuditionActive (false); /* EMIT SIGNAL */
}
{
/* can be called before we have an auditioner object */
if (auditioner) {
- return auditioner->active();
+ return auditioner->auditioning();
} else {
return false;
}
_butler->summon ();
}
+ /* if using a monitor section, run it because otherwise we don't hear anything */
+
+ if (_monitor_out) {
+ _monitor_out->passthru (_transport_frame, _transport_frame + nframes, nframes, false);
+ }
+
/* handle pending events */
while (pending_events.read (&ev, 1) == 1) {
process_event (ev);
}
- if (!auditioner->active()) {
+ if (!auditioner->auditioning()) {
/* auditioner no longer active, so go back to the normal process callback */
process_function = &Session::process_with_events;
}
if (bus_profile->master_out_channels) {
Route* rt = new Route (*this, _("master"), Route::MasterOut, DataType::AUDIO);
+ if (rt->init ()) {
+ delete rt;
+ return -1;
+ }
boost_debug_shared_ptr_mark_interesting (rt, "Route");
boost::shared_ptr<Route> r (rt);
r->input()->ensure_io (count, false, this);
if (Config->get_use_monitor_bus()) {
Route* rt = new Route (*this, _("monitor"), Route::MonitorOut, DataType::AUDIO);
+ if (rt->init ()) {
+ delete rt;
+ return -1;
+ }
boost_debug_shared_ptr_mark_interesting (rt, "Route");
boost::shared_ptr<Route> r (rt);
r->input()->ensure_io (count, false, this);
return ret;
}
- bool has_diskstream = (node.property ("diskstream") != 0 || node.property ("diskstream-id") != 0);
+ const XMLProperty* dsprop;
+ if ((dsprop = node.property (X_("diskstream-id"))) == 0) {
+ dsprop = node.property (X_("diskstream"));
+ }
+
DataType type = DataType::AUDIO;
const XMLProperty* prop = node.property("default-type");
assert (type != DataType::NIL);
- if (has_diskstream) {
- if (type == DataType::AUDIO) {
- AudioTrack* at = new AudioTrack (*this, X_("toBeResetFroXML"));
- if (at->set_state (node, version) == 0) {
- boost_debug_shared_ptr_mark_interesting (at, "Track");
- ret.reset (at);
+ if (dsprop) {
+
+ boost::shared_ptr<Diskstream> ds;
+ PBD::ID diskstream_id (dsprop->value());
+ PBD::ID zero ("0");
+
+ /* this wierd hack is used when creating
+ tracks from a template. We have a special
+ ID for the diskstream that means "you
+ should create a new diskstream here, not
+ look for an old one."
+ */
+
+ if (diskstream_id != zero) {
+
+ ds = diskstream_by_id (diskstream_id);
+
+ if (!ds) {
+ error << string_compose (_("cannot find diskstream ID %1"), diskstream_id.to_s()) << endmsg;
+ return ret;
}
+ }
+
+ Track* track;
+
+ if (type == DataType::AUDIO) {
+ track = new AudioTrack (*this, X_("toBeResetFroXML"));
- } else {
- MidiTrack* mt = new MidiTrack (*this, X_("toBeResetFroXML"));
- if (mt->set_state (node, version) == 0) {
- ret.reset (mt);
- }
- }
+ } else {
+ track = new MidiTrack (*this, X_("toBeResetFroXML"));
+ }
+
+ if (track->init()) {
+ delete track;
+ return ret;
+ }
+
+ if (ds) {
+ track->set_diskstream (ds);
+ } else {
+ track->use_new_diskstream ();
+ }
+
+ if (track->set_state (node, version)) {
+ delete track;
+ return ret;
+ }
+
+ boost_debug_shared_ptr_mark_interesting (track, "Track");
+ ret.reset (track);
+
} else {
Route* rt = new Route (*this, X_("toBeResetFroXML"));
- if (rt->set_state (node, version) == 0) {
+
+ if (rt->init () == 0 && rt->set_state (node, version) == 0) {
boost_debug_shared_ptr_mark_interesting (rt, "Route");
ret.reset (rt);
+ } else {
+ delete rt;
}
}
PostTransportWork ptw = post_transport_work ();
if (ptw & PostTransportAudition) {
- if (auditioner && auditioner->active()) {
+ if (auditioner && auditioner->auditioning()) {
process_function = &Session::process_audition;
} else {
process_function = &Session::process_with_events;
Track::Track (Session& sess, string name, Route::Flag flag, TrackMode mode, DataType default_type)
: Route (sess, name, flag, default_type)
+ , _saved_meter_point (_meter_point)
+ , _mode (mode)
, _rec_enable_control (new RecEnableControllable(*this))
{
- _declickable = true;
_freeze_record.state = NoFreeze;
- _saved_meter_point = _meter_point;
- _mode = mode;
+ _declickable = true;
}
Track::~Track ()
DEBUG_TRACE (DEBUG::Destruction, string_compose ("track %1 destructor\n", _name));
}
+int
+Track::init ()
+{
+ if (Route::init ()) {
+ return -1;
+ }
+
+ return 0;
+}
XMLNode&
Track::get_state ()
{
{
ChanCount cc = _input->n_ports ();
- cerr << "**************" << _name << " IS = " << cc << endl;
-
if (cc.n_total() == 0 && _diskstream) {
- cerr << "*******" << _name << " use diskstream channel count\n";
return cc = _diskstream->n_channels();
}