Hide/remove per-track record-mode in favor of global setting.

This commit is contained in:
Robin Gareus 2016-12-12 19:44:03 +01:00
parent 85e4b1d98f
commit 8ba7e8f4ef
19 changed files with 52 additions and 1 deletions

View File

@ -370,7 +370,9 @@ AddRouteDialog::refill_track_modes ()
vector<string> s;
s.push_back (_("Normal"));
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
s.push_back (_("Non Layered"));
#endif
s.push_back (_("Tape"));
set_popdown_strings (mode_combo, s);

View File

@ -772,6 +772,7 @@ RouteTimeAxisView::build_display_menu ()
/* show nothing */
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
Menu* mode_menu = manage (new Menu);
MenuList& mode_items = mode_menu->items ();
mode_menu->set_name ("ArdourContextMenu");
@ -820,6 +821,7 @@ RouteTimeAxisView::build_display_menu ()
i->set_inconsistent (non_layered != 0 && (normal != 0 || tape != 0));
items.push_back (MenuElem (_("Record Mode"), *mode_menu));
#endif
items.push_back (SeparatorElem());
@ -888,6 +890,7 @@ RouteTimeAxisView::build_display_menu ()
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
void
RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
{
@ -911,6 +914,7 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
track()->set_mode (mode);
}
}
#endif
void
RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end, int layers, int layer)

View File

@ -280,7 +280,9 @@ protected:
ArdourCanvas::Rectangle* timestretch_rect;
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
void set_track_mode (ARDOUR::TrackMode, bool apply_to_selection = false);
#endif
/** Information about all automatable processor parameters that apply to
* this route. The Amp processor is not included in this list.

View File

@ -288,7 +288,9 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
if (is_track()) {
track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteUI::map_frozen, this), gui_context());
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
track()->TrackModeChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::track_mode_changed, this), gui_context());
#endif
track_mode_changed();
}

View File

@ -74,9 +74,11 @@ class LIBARDOUR_API AudioDiskstream : public Diskstream
void set_record_enabled (bool yn);
void set_record_safe (bool yn);
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
int set_destructive (bool yn);
int set_non_layered (bool yn);
bool can_become_destructive (bool& requires_bounce) const;
#endif
boost::shared_ptr<AudioPlaylist> audio_playlist () { return boost::dynamic_pointer_cast<AudioPlaylist>(_playlist); }

View File

@ -37,8 +37,10 @@ class LIBARDOUR_API AudioTrack : public Track
AudioTrack (Session&, std::string name, TrackMode m = Normal);
~AudioTrack ();
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
int set_mode (TrackMode m);
bool can_use_mode (TrackMode m, bool& bounce_required);
#endif
int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool& need_butler);

View File

@ -109,13 +109,15 @@ class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream
virtual void set_record_safe (bool yn) = 0;
bool destructive() const { return _flags & Destructive; }
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
virtual int set_destructive (bool /*yn*/) { return -1; }
virtual int set_non_layered (bool /*yn*/) { return -1; }
virtual bool can_become_destructive (bool& /*requires_bounce*/) const { return false; }
#endif
bool hidden() const { return _flags & Hidden; }
bool recordable() const { return _flags & Recordable; }
bool non_layered() const { return _flags & NonLayered; }
bool non_layered() const; // { return _flags & NonLayered; }
bool reversed() const { return _actual_speed < 0.0f; }
double speed() const { return _visible_speed; }

View File

@ -91,7 +91,9 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream
boost::shared_ptr<SMFSource> write_source () { return _write_source; }
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
int set_destructive (bool yn); // doom!
#endif
void set_note_mode (NoteMode m);

View File

@ -36,6 +36,7 @@ CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
CONFIG_VARIABLE (bool, punch_in, "punch-in", false)
CONFIG_VARIABLE (bool, punch_out, "punch-out", false)
CONFIG_VARIABLE (bool, layered_record_mode, "layered-record-mode", false)
CONFIG_VARIABLE (uint32_t, subframes_per_frame, "subframes-per-frame", 100)
CONFIG_VARIABLE (Timecode::TimecodeFormat, timecode_format, "timecode-format", Timecode::timecode_30)
CONFIG_VARIABLE_SPECIAL(std::string, raid_path, "raid-path", "", PBD::path_expand)

View File

@ -67,7 +67,9 @@ class LIBARDOUR_API SndFileSource : public AudioFileSource {
void mark_capture_end ();
void clear_capture_marks();
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
bool set_destructive (bool yn);
#endif
bool one_of_several_channels () const;
uint32_t channel_count () const { return _info.channels; }

View File

@ -82,7 +82,9 @@ class LIBARDOUR_API Source : public SessionObject
bool destructive() const { return (_flags & Destructive); }
bool writable () const;
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
virtual bool set_destructive (bool /*yn*/) { return false; }
#endif
virtual bool length_mutable() const { return false; }
static PBD::Signal1<void,Source*> SourceCreated;

View File

@ -56,9 +56,11 @@ class LIBARDOUR_API Track : public Route, public Recordable, public PublicDiskst
void resync_track_name ();
TrackMode mode () const { return _mode; }
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
virtual int set_mode (TrackMode /*m*/) { return false; }
virtual bool can_use_mode (TrackMode /*m*/, bool& /*bounce_required*/) { return false; }
PBD::Signal0<void> TrackModeChanged;
#endif
boost::shared_ptr<MonitorControl> monitoring_control() const { return _monitoring_control; }

View File

@ -361,6 +361,7 @@ AudioDiskstream::use_destructive_playlist ()
{
const RegionList& rl (_playlist->region_list_property().rlist());
if (rl.size() > 0) {
/* this can happen when dragging a region onto a tape track */
assert((rl.size() == 1));
rp = rl.front();
}
@ -392,7 +393,12 @@ AudioDiskstream::use_destructive_playlist ()
/* this might be false if we switched modes, so force it */
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
(*chan)->write_source->set_destructive (true);
#else
// should be set when creating the source or loading the state
assert ((*chan)->write_source->destructive());
#endif
}
/* the source list will never be reset for a destructive track */
@ -2384,6 +2390,7 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
return 0;
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
int
AudioDiskstream::set_non_layered (bool yn)
{
@ -2497,6 +2504,7 @@ AudioDiskstream::can_become_destructive (bool& requires_bounce) const
requires_bounce = false;
return true;
}
#endif
void
AudioDiskstream::adjust_playback_buffering ()

View File

@ -82,12 +82,14 @@ AudioTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
Track::set_diskstream (ds);
_diskstream->set_track (this);
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
if (Profile->get_trx()) {
_diskstream->set_destructive (false);
} else {
_diskstream->set_destructive (_mode == Destructive);
}
_diskstream->set_non_layered (_mode == NonLayered);
#endif
if (audio_diskstream()->deprecated_io_node) {
@ -110,6 +112,7 @@ AudioTrack::audio_diskstream() const
return boost::dynamic_pointer_cast<AudioDiskstream>(_diskstream);
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
int
AudioTrack::set_mode (TrackMode m)
{
@ -149,6 +152,7 @@ AudioTrack::can_use_mode (TrackMode m, bool& bounce_required)
return false;
}
}
#endif
int
AudioTrack::deprecated_use_diskstream_connections ()

View File

@ -332,12 +332,14 @@ Auditioner::set_diskstream (boost::shared_ptr<Diskstream> ds)
Track::set_diskstream (ds);
_diskstream->set_track (this);
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
if (Profile->get_trx()) {
_diskstream->set_destructive (false);
} else {
_diskstream->set_destructive (_mode == Destructive);
}
_diskstream->set_non_layered (_mode == NonLayered);
#endif
_diskstream->set_record_enabled (false);
_diskstream->request_input_monitoring (false);

View File

@ -148,6 +148,12 @@ Diskstream::~Diskstream ()
delete deprecated_io_node;
}
bool
Diskstream::non_layered () const
{
return _session.config.get_layered_record_mode();
}
void
Diskstream::set_track (Track* t)
{

View File

@ -288,6 +288,7 @@ MidiDiskstream::use_copy_playlist ()
}
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
/** Overloaded from parent to die horribly
*/
int
@ -295,6 +296,7 @@ MidiDiskstream::set_destructive (bool yn)
{
return yn ? -1 : 0;
}
#endif
void
MidiDiskstream::set_note_mode (NoteMode m)

View File

@ -139,11 +139,13 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
mds->reset_tracker ();
_diskstream->set_track (this);
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
if (Profile->get_trx()) {
_diskstream->set_destructive (false);
} else {
_diskstream->set_destructive (_mode == Destructive);
}
#endif
_diskstream->set_record_enabled (false);
_diskstream_data_recorded_connection.disconnect ();

View File

@ -799,6 +799,7 @@ SndFileSource::natural_position() const
return _timeline_position;
}
#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
bool
SndFileSource::set_destructive (bool yn)
{
@ -817,6 +818,7 @@ SndFileSource::set_destructive (bool yn)
return true;
}
#endif
void
SndFileSource::clear_capture_marks ()