mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Move toggle-waveforms-while-recording into RC options.
git-svn-id: svn://localhost/ardour2/branches/3.0@6935 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4493d639e6
commit
0cde999d87
16 changed files with 15 additions and 100 deletions
|
|
@ -397,7 +397,6 @@
|
||||||
<menuitem action='show-editor-mixer'/>
|
<menuitem action='show-editor-mixer'/>
|
||||||
<menuitem action='show-editor-list'/>
|
<menuitem action='show-editor-list'/>
|
||||||
<menuitem action='ToggleMeasureVisibility'/>
|
<menuitem action='ToggleMeasureVisibility'/>
|
||||||
<menuitem action='ToggleWaveformsWhileRecording'/>
|
|
||||||
<menuitem action='ToggleSummary'/>
|
<menuitem action='ToggleSummary'/>
|
||||||
<menuitem action='ToggleGroupTabs'/>
|
<menuitem action='ToggleGroupTabs'/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,6 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
|
||||||
color_handler ();
|
color_handler ();
|
||||||
_amplitude_above_axis = 1.0;
|
_amplitude_above_axis = 1.0;
|
||||||
|
|
||||||
use_rec_regions = tv.editor().show_waveforms_recording ();
|
|
||||||
|
|
||||||
Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::parameter_changed, this, _1), gui_context());
|
Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::parameter_changed, this, _1), gui_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -448,9 +446,9 @@ AudioStreamView::setup_rec_box ()
|
||||||
if (!rec_active &&
|
if (!rec_active &&
|
||||||
_trackview.session()->record_status() == Session::Recording &&
|
_trackview.session()->record_status() == Session::Recording &&
|
||||||
_trackview.get_diskstream()->record_enabled()) {
|
_trackview.get_diskstream()->record_enabled()) {
|
||||||
if (_trackview.audio_track()->mode() == Normal && use_rec_regions && rec_regions.size() == rec_rects.size()) {
|
if (_trackview.audio_track()->mode() == Normal && Config->get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||||
|
|
||||||
/* add a new region, but don't bother if they set use_rec_regions mid-record */
|
/* add a new region, but don't bother if they set show-waveforms-while-recording mid-record */
|
||||||
|
|
||||||
SourceList sources;
|
SourceList sources;
|
||||||
|
|
||||||
|
|
@ -628,7 +626,7 @@ AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::we
|
||||||
void
|
void
|
||||||
AudioStreamView::update_rec_regions ()
|
AudioStreamView::update_rec_regions ()
|
||||||
{
|
{
|
||||||
if (use_rec_regions) {
|
if (Config->get_show_waveforms_while_recording ()) {
|
||||||
uint32_t n = 0;
|
uint32_t n = 0;
|
||||||
|
|
||||||
for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin();
|
for (list<pair<boost::shared_ptr<Region>,RegionView*> >::iterator iter = rec_regions.begin();
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ class AudioStreamView : public StreamView
|
||||||
gdouble get_amplitude_above_axis () { return _amplitude_above_axis; }
|
gdouble get_amplitude_above_axis () { return _amplitude_above_axis; }
|
||||||
|
|
||||||
void set_show_waveforms (bool yn);
|
void set_show_waveforms (bool yn);
|
||||||
void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
|
|
||||||
|
|
||||||
void foreach_crossfadeview (void (CrossfadeView::*pmf)(void));
|
void foreach_crossfadeview (void (CrossfadeView::*pmf)(void));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,16 +186,6 @@ AudioTimeAxisView::append_extra_display_menu_items ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AudioTimeAxisView::set_show_waveforms_recording (bool yn)
|
|
||||||
{
|
|
||||||
AudioStreamView* asv = audio_view();
|
|
||||||
|
|
||||||
if (asv) {
|
|
||||||
asv->set_show_waveforms_recording (yn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show)
|
AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,6 @@ AutomationStreamView::AutomationStreamView (AutomationTimeAxisView& tv)
|
||||||
{
|
{
|
||||||
//canvas_rect->property_fill_color_rgba() = stream_base_color;
|
//canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||||
canvas_rect->property_outline_color_rgba() = RGBA_BLACK;
|
canvas_rect->property_outline_color_rgba() = RGBA_BLACK;
|
||||||
|
|
||||||
use_rec_regions = tv.editor().show_waveforms_recording ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AutomationStreamView::~AutomationStreamView ()
|
AutomationStreamView::~AutomationStreamView ()
|
||||||
|
|
@ -181,21 +179,6 @@ AutomationStreamView::setup_rec_box ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
AutomationStreamView::update_rec_regions (nframes_t /*start*/, nframes_t /*dur*/)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
AutomationStreamView::rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur)
|
|
||||||
{
|
|
||||||
// this is called from the butler thread for now
|
|
||||||
|
|
||||||
ENSURE_GUI_THREAD (*this, &AutomationStreamView::rec_data_range_ready, start, dur)
|
|
||||||
|
|
||||||
this->update_rec_regions (start, dur);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AutomationStreamView::color_handler ()
|
AutomationStreamView::color_handler ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,6 @@ class AutomationStreamView : public StreamView
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setup_rec_box ();
|
void setup_rec_box ();
|
||||||
void rec_data_range_ready (jack_nframes_t start, jack_nframes_t dur);
|
|
||||||
void update_rec_regions (jack_nframes_t start, jack_nframes_t dur);
|
|
||||||
|
|
||||||
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
|
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_data, bool recording = false);
|
||||||
void display_region(AutomationRegionView* region_view);
|
void display_region(AutomationRegionView* region_view);
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,6 @@ Editor::Editor ()
|
||||||
|
|
||||||
current_interthread_info = 0;
|
current_interthread_info = 0;
|
||||||
_show_measures = true;
|
_show_measures = true;
|
||||||
_show_waveforms_recording = true;
|
|
||||||
show_gain_after_trim = false;
|
show_gain_after_trim = false;
|
||||||
verbose_cursor_on = true;
|
verbose_cursor_on = true;
|
||||||
last_item_entered = 0;
|
last_item_entered = 0;
|
||||||
|
|
@ -2332,18 +2331,6 @@ Editor::set_state (const XMLNode& node, int /*version*/)
|
||||||
set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point), true);
|
set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property ("show-waveforms-recording"))) {
|
|
||||||
bool yn = string_is_affirmative (prop->value());
|
|
||||||
_show_waveforms_recording = !yn;
|
|
||||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording"));
|
|
||||||
if (act) {
|
|
||||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
|
||||||
/* do it twice to force the change */
|
|
||||||
tact->set_active (!yn);
|
|
||||||
tact->set_active (yn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((prop = node.property ("show-measures"))) {
|
if ((prop = node.property ("show-measures"))) {
|
||||||
bool yn = string_is_affirmative (prop->value());
|
bool yn = string_is_affirmative (prop->value());
|
||||||
_show_measures = !yn;
|
_show_measures = !yn;
|
||||||
|
|
@ -2490,7 +2477,6 @@ Editor::get_state ()
|
||||||
snprintf (buf, sizeof (buf), "%f", vertical_adjustment.get_value ());
|
snprintf (buf, sizeof (buf), "%f", vertical_adjustment.get_value ());
|
||||||
node->add_property ("y-origin", buf);
|
node->add_property ("y-origin", buf);
|
||||||
|
|
||||||
node->add_property ("show-waveforms-recording", _show_waveforms_recording ? "yes" : "no");
|
|
||||||
node->add_property ("show-measures", _show_measures ? "yes" : "no");
|
node->add_property ("show-measures", _show_measures ? "yes" : "no");
|
||||||
node->add_property ("follow-playhead", _follow_playhead ? "yes" : "no");
|
node->add_property ("follow-playhead", _follow_playhead ? "yes" : "no");
|
||||||
node->add_property ("stationary-playhead", _stationary_playhead ? "yes" : "no");
|
node->add_property ("stationary-playhead", _stationary_playhead ? "yes" : "no");
|
||||||
|
|
|
||||||
|
|
@ -223,11 +223,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
std::vector<std::string> rb_opt_strings;
|
std::vector<std::string> rb_opt_strings;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* option editor-access */
|
|
||||||
|
|
||||||
void set_show_waveforms_recording (bool yn);
|
|
||||||
bool show_waveforms_recording() const { return _show_waveforms_recording; }
|
|
||||||
|
|
||||||
/* things that need to be public to be used in the main menubar */
|
/* things that need to be public to be used in the main menubar */
|
||||||
|
|
||||||
void new_region_from_selection ();
|
void new_region_from_selection ();
|
||||||
|
|
@ -367,7 +362,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
bool dragging_playhead () const { return _dragging_playhead; }
|
bool dragging_playhead () const { return _dragging_playhead; }
|
||||||
|
|
||||||
void toggle_zero_line_visibility ();
|
void toggle_zero_line_visibility ();
|
||||||
void toggle_waveforms_while_recording ();
|
|
||||||
void set_summary ();
|
void set_summary ();
|
||||||
void set_group_tabs ();
|
void set_group_tabs ();
|
||||||
void toggle_measure_visibility ();
|
void toggle_measure_visibility ();
|
||||||
|
|
@ -1414,8 +1408,6 @@ public:
|
||||||
bool _follow_playhead;
|
bool _follow_playhead;
|
||||||
/// true if we scroll the tracks rather than the playhead
|
/// true if we scroll the tracks rather than the playhead
|
||||||
bool _stationary_playhead;
|
bool _stationary_playhead;
|
||||||
/// true if waveforms should be shown while recording audio tracks, otherwise false
|
|
||||||
bool _show_waveforms_recording;
|
|
||||||
|
|
||||||
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
|
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -820,8 +820,6 @@ Editor::register_actions ()
|
||||||
act = ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import From Session"), sigc::mem_fun(*this, &Editor::session_import_dialog));
|
act = ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import From Session"), sigc::mem_fun(*this, &Editor::session_import_dialog));
|
||||||
ActionManager::write_sensitive_actions.push_back (act);
|
ActionManager::write_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), sigc::mem_fun (*this, &Editor::toggle_waveforms_while_recording));
|
|
||||||
|
|
||||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary));
|
ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary));
|
||||||
|
|
||||||
ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
|
ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs));
|
||||||
|
|
@ -898,16 +896,6 @@ Editor::toggle_ruler_visibility (RulerType rt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Editor::toggle_waveforms_while_recording ()
|
|
||||||
{
|
|
||||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording"));
|
|
||||||
if (act) {
|
|
||||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
|
||||||
set_show_waveforms_recording (tact->get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_summary ()
|
Editor::set_summary ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,21 +34,6 @@
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
void
|
|
||||||
Editor::set_show_waveforms_recording (bool yn)
|
|
||||||
{
|
|
||||||
AudioTimeAxisView* atv;
|
|
||||||
|
|
||||||
if (_show_waveforms_recording != yn) {
|
|
||||||
_show_waveforms_recording = yn;
|
|
||||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
|
||||||
if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
|
|
||||||
atv->set_show_waveforms_recording (yn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::start_updating_meters ()
|
Editor::start_updating_meters ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,6 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
|
||||||
stream_base_color = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();
|
stream_base_color = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
use_rec_regions = tv.editor().show_waveforms_recording ();
|
|
||||||
|
|
||||||
/* use a group dedicated to MIDI underlays. Audio underlays are not in this group. */
|
/* use a group dedicated to MIDI underlays. Audio underlays are not in this group. */
|
||||||
midi_underlay_group = new ArdourCanvas::Group (*canvas_group);
|
midi_underlay_group = new ArdourCanvas::Group (*canvas_group);
|
||||||
midi_underlay_group->lower_to_bottom();
|
midi_underlay_group->lower_to_bottom();
|
||||||
|
|
@ -389,9 +387,9 @@ MidiStreamView::setup_rec_box ()
|
||||||
_trackview.session()->record_status() == Session::Recording &&
|
_trackview.session()->record_status() == Session::Recording &&
|
||||||
_trackview.get_diskstream()->record_enabled()) {
|
_trackview.get_diskstream()->record_enabled()) {
|
||||||
|
|
||||||
if (use_rec_regions && rec_regions.size() == rec_rects.size()) {
|
if (Config->get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||||
|
|
||||||
/* add a new region, but don't bother if they set use_rec_regions mid-record */
|
/* add a new region, but don't bother if they set show-waveforms-while-recording mid-record */
|
||||||
|
|
||||||
MidiRegion::SourceList sources;
|
MidiRegion::SourceList sources;
|
||||||
|
|
||||||
|
|
@ -526,7 +524,7 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (*this, &MidiStreamView::update_rec_regions, data, start, dur)
|
ENSURE_GUI_THREAD (*this, &MidiStreamView::update_rec_regions, data, start, dur)
|
||||||
|
|
||||||
if (use_rec_regions) {
|
if (Config->get_show_waveforms_while_recording ()) {
|
||||||
|
|
||||||
uint32_t n = 0;
|
uint32_t n = 0;
|
||||||
bool update_range = false;
|
bool update_range = false;
|
||||||
|
|
|
||||||
|
|
@ -180,13 +180,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
*/
|
*/
|
||||||
virtual void consider_auditioning (boost::shared_ptr<ARDOUR::Region> r) = 0;
|
virtual void consider_auditioning (boost::shared_ptr<ARDOUR::Region> r) = 0;
|
||||||
|
|
||||||
/** Set whether waveforms should be shown while recording audio tracks.
|
|
||||||
* @param yn true to show waveforms, otherwise false.
|
|
||||||
*/
|
|
||||||
virtual void set_show_waveforms_recording (bool yn) = 0;
|
|
||||||
|
|
||||||
/** @return true if waveforms are being shown while recording, otherwise false */
|
|
||||||
virtual bool show_waveforms_recording () const = 0;
|
|
||||||
virtual void new_region_from_selection () = 0;
|
virtual void new_region_from_selection () = 0;
|
||||||
virtual void separate_region_from_selection () = 0;
|
virtual void separate_region_from_selection () = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1153,11 +1153,18 @@ RCOptionEditor::RCOptionEditor ()
|
||||||
|
|
||||||
add_option (_("Editor"), wfsh);
|
add_option (_("Editor"), wfsh);
|
||||||
|
|
||||||
|
add_option (_("Editor"),
|
||||||
|
new BoolOption (
|
||||||
|
"show-waveforms-while-recording",
|
||||||
|
_("Show waveforms for audio while it is being recorded"),
|
||||||
|
sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_waveforms_while_recording),
|
||||||
|
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording)
|
||||||
|
));
|
||||||
|
|
||||||
/* AUDIO */
|
/* AUDIO */
|
||||||
|
|
||||||
add_option (_("Audio"), new OptionEditorHeading (_("Solo")));
|
add_option (_("Audio"), new OptionEditorHeading (_("Solo")));
|
||||||
|
|
||||||
|
|
||||||
add_option (_("Audio"),
|
add_option (_("Audio"),
|
||||||
new BoolOption (
|
new BoolOption (
|
||||||
"solo-control-is-listen-control",
|
"solo-control-is-listen-control",
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
|
||||||
, _samples_per_unit (_trackview.editor().get_current_zoom ())
|
, _samples_per_unit (_trackview.editor().get_current_zoom ())
|
||||||
, rec_updating(false)
|
, rec_updating(false)
|
||||||
, rec_active(false)
|
, rec_active(false)
|
||||||
, use_rec_regions (tv.editor().show_waveforms_recording ())
|
|
||||||
, region_color(_trackview.color())
|
, region_color(_trackview.color())
|
||||||
, stream_base_color(0xFFFFFFFF)
|
, stream_base_color(0xFFFFFFFF)
|
||||||
, _layers (1)
|
, _layers (1)
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,6 @@ protected:
|
||||||
std::list< std::pair<boost::shared_ptr<ARDOUR::Region>,RegionView* > > rec_regions;
|
std::list< std::pair<boost::shared_ptr<ARDOUR::Region>,RegionView* > > rec_regions;
|
||||||
bool rec_updating;
|
bool rec_updating;
|
||||||
bool rec_active;
|
bool rec_active;
|
||||||
bool use_rec_regions;
|
|
||||||
|
|
||||||
Gdk::Color region_color; ///< Contained region color
|
Gdk::Color region_color; ///< Contained region color
|
||||||
uint32_t stream_base_color; ///< Background color
|
uint32_t stream_base_color; ///< Background color
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ CONFIG_VARIABLE (bool, rubberbanding_snaps_to_grid, "rubberbanding-snaps-to-grid
|
||||||
CONFIG_VARIABLE (long, font_scale, "font-scale", 102400)
|
CONFIG_VARIABLE (long, font_scale, "font-scale", 102400)
|
||||||
CONFIG_VARIABLE (std::string, default_session_parent_dir, "default-session-parent-dir", "~")
|
CONFIG_VARIABLE (std::string, default_session_parent_dir, "default-session-parent-dir", "~")
|
||||||
CONFIG_VARIABLE (bool, show_waveforms, "show-waveforms", true)
|
CONFIG_VARIABLE (bool, show_waveforms, "show-waveforms", true)
|
||||||
|
CONFIG_VARIABLE (bool, show_waveforms_while_recording, "show-waveforms-while-recording", true)
|
||||||
CONFIG_VARIABLE (WaveformScale, waveform_scale, "waveform-scale", Linear)
|
CONFIG_VARIABLE (WaveformScale, waveform_scale, "waveform-scale", Linear)
|
||||||
CONFIG_VARIABLE (WaveformShape, waveform_shape, "waveform-shape", Traditional)
|
CONFIG_VARIABLE (WaveformShape, waveform_shape, "waveform-shape", Traditional)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue