2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <ardour/location.h>
21 #include <ardour/audio_diskstream.h>
25 #include "audio_time_axis.h"
26 #include "region_view.h"
27 #include "selection.h"
29 using namespace ARDOUR;
33 Editor::set_route_loop_selection ()
35 if (session == 0 || selection->time.empty()) {
39 nframes_t start = selection->time[clicked_selection].start;
40 nframes_t end = selection->time[clicked_selection].end;
42 Location* loc = transport_loop_location();
46 loc->set (start, end);
48 // enable looping, reposition and start rolling
49 session->request_play_loop (true);
50 session->request_locate (loc->start(), true);
56 Editor::set_show_waveforms (bool yn)
58 AudioTimeAxisView* atv;
60 if (_show_waveforms != yn) {
62 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
63 if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
64 atv->set_show_waveforms (yn);
71 Editor::set_show_waveforms_recording (bool yn)
73 AudioTimeAxisView* atv;
75 if (_show_waveforms_recording != yn) {
76 _show_waveforms_recording = yn;
77 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
78 if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
79 atv->set_show_waveforms_recording (yn);