David Robillard
6f4a92f740
specializations of (new, for the most part) generic bases. (eg. most everything from the MIDI branch except for actual MIDI things, so merges have a chance of succeeding). Also the new edit toolbar, and various other cleanup things I did along the way. Should be functionally equivalent (except the toolbar), this is just design work. She's a big'un.... git-svn-id: svn://localhost/ardour2/trunk@727 d708f5d6-7413-0410-9779-e7cbd77b26cf
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
#include <ardour/location.h>
|
|
#include <ardour/audio_diskstream.h>
|
|
|
|
#include "editor.h"
|
|
#include "editing.h"
|
|
#include "audio_time_axis.h"
|
|
#include "region_view.h"
|
|
#include "selection.h"
|
|
|
|
using namespace ARDOUR;
|
|
using namespace PBD;
|
|
|
|
void
|
|
Editor::set_route_loop_selection ()
|
|
{
|
|
if (session == 0 || selection->time.empty()) {
|
|
return;
|
|
}
|
|
|
|
jack_nframes_t start = selection->time[clicked_selection].start;
|
|
jack_nframes_t end = selection->time[clicked_selection].end;
|
|
|
|
Location* loc = transport_loop_location();
|
|
|
|
if (loc) {
|
|
|
|
loc->set (start, end);
|
|
|
|
// enable looping, reposition and start rolling
|
|
session->request_auto_loop (true);
|
|
session->request_locate (loc->start(), true);
|
|
}
|
|
|
|
}
|
|
|
|
void
|
|
Editor::set_show_waveforms (bool yn)
|
|
{
|
|
AudioTimeAxisView* atv;
|
|
|
|
if (_show_waveforms != yn) {
|
|
_show_waveforms = yn;
|
|
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
|
if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
|
|
atv->set_show_waveforms (yn);
|
|
}
|
|
}
|
|
DisplayControlChanged (Editing::ShowWaveforms);
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
DisplayControlChanged (Editing::ShowWaveformsRecording);
|
|
}
|
|
}
|