diff options
author | Doug McLain <doug@nostar.net> | 2007-11-17 23:31:56 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-11-17 23:31:56 +0000 |
commit | 8683ccfd80e9cb222ba94684954caff7cf318670 (patch) | |
tree | 2f8cb59a6263a1481417816dba8572b2fd3c679a /gtk2_ardour/editor_audiotrack.cc | |
parent | 6220b80b9b5f81e7058e44a829d1b198db472f29 (diff) |
Level meters added to editor tracks, smaller and above
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2690 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_audiotrack.cc')
-rw-r--r-- | gtk2_ardour/editor_audiotrack.cc | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_audiotrack.cc b/gtk2_ardour/editor_audiotrack.cc index 755437c628..db831bfd61 100644 --- a/gtk2_ardour/editor_audiotrack.cc +++ b/gtk2_ardour/editor_audiotrack.cc @@ -20,6 +20,7 @@ #include <ardour/location.h> #include <ardour/audio_diskstream.h> +#include "ardour_ui.h" #include "editor.h" #include "editing.h" #include "audio_time_axis.h" @@ -91,3 +92,61 @@ Editor::set_show_waveforms_recording (bool yn) } } } + +gint +Editor::start_updating () +{ + AudioTimeAxisView* atv; + + if (is_mapped() && session) { + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) { + atv->show_meter (); + } + } + } + fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Editor::fast_update_strips)); + return 0; +} + +gint +Editor::stop_updating () +{ + AudioTimeAxisView* atv; + + cerr << "Editor::stop_updating () called" << endl; + if (is_mapped() && session) { + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) { + atv->hide_meter (); + } + } + } + fast_screen_update_connection.disconnect(); + return 0; +} + +void +Editor::toggle_meter_updating() +{ + if (Config->get_show_track_meters()) { + start_updating(); + } else { + stop_updating (); + } +} + +void +Editor::fast_update_strips () +{ + AudioTimeAxisView* atv; + + if (is_mapped() && session) { + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) { + atv->fast_update (); + } + } + } +} + |