2005-09-25 14:42:24 -04:00
|
|
|
#include <ardour/location.h>
|
2006-06-14 17:17:32 -04:00
|
|
|
#include <ardour/audio_diskstream.h>
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "editor.h"
|
|
|
|
#include "editing.h"
|
|
|
|
#include "audio_time_axis.h"
|
2006-07-31 23:23:35 -04:00
|
|
|
#include "region_view.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
#include "selection.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void
|
|
|
|
Editor::set_route_loop_selection ()
|
|
|
|
{
|
|
|
|
if (session == 0 || selection->time.empty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-09-28 13:23:52 -04:00
|
|
|
nframes_t start = selection->time[clicked_selection].start;
|
|
|
|
nframes_t end = selection->time[clicked_selection].end;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Location* loc = transport_loop_location();
|
|
|
|
|
|
|
|
if (loc) {
|
|
|
|
|
|
|
|
loc->set (start, end);
|
|
|
|
|
|
|
|
// enable looping, reposition and start rolling
|
2006-09-25 17:24:00 -04:00
|
|
|
session->request_play_loop (true);
|
2005-09-25 14:42:24 -04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|