summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_export_audio.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-08-01 03:23:35 +0000
committerDavid Robillard <d@drobilla.net>2006-08-01 03:23:35 +0000
commit6f4a92f740b2fd75794489ce58f9348f8adf6bf4 (patch)
tree68ecd4d29bf7d1db00da9dfa9e14ac2e93ca1e42 /gtk2_ardour/editor_export_audio.cc
parentba0c8bc2ef92a84b99040df46e76d8ac54d3d9da (diff)
Heavy-duty abstraction work to split type-specific classes into
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
Diffstat (limited to 'gtk2_ardour/editor_export_audio.cc')
-rw-r--r--gtk2_ardour/editor_export_audio.cc36
1 files changed, 19 insertions, 17 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 0be0a61b23..46a704b435 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -31,7 +31,7 @@
#include "selection.h"
#include "time_axis_view.h"
#include "audio_time_axis.h"
-#include "regionview.h"
+#include "audio_region_view.h"
#include <pbd/pthread_utils.h>
#include <ardour/types.h>
@@ -92,12 +92,12 @@ Editor::export_region ()
return;
}
- ExportDialog* dialog = new ExportRegionDialog (*this, &clicked_regionview->region);
+ ExportDialog* dialog = new ExportRegionDialog (*this, &clicked_regionview->region());
dialog->connect_to_session (session);
dialog->set_range (
- clicked_regionview->region.first_frame(),
- clicked_regionview->region.last_frame());
+ clicked_regionview->region().first_frame(),
+ clicked_regionview->region().last_frame());
dialog->start_export();
}
@@ -123,24 +123,26 @@ Editor::export_range_markers ()
}
int
-Editor::write_region_selection (AudioRegionSelection& regions)
+Editor::write_region_selection (RegionSelection& regions)
{
- for (AudioRegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
- if (write_region ("", (*i)->region) == false) {
- return -1;
- }
+ for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
+ AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*i);
+ if (arv)
+ if (write_region ("", arv->audio_region()) == false)
+ return -1;
}
+
return 0;
}
void
Editor::bounce_region_selection ()
{
- for (AudioRegionSelection::iterator i = selection->audio_regions.begin(); i != selection->audio_regions.end(); ++i) {
+ for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
- AudioRegion& region ((*i)->region);
- AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*>(&(*i)->get_time_axis_view());
- AudioTrack* track = dynamic_cast<AudioTrack*>(atv->route().get());
+ Region& region ((*i)->region());
+ RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
+ Track* track = dynamic_cast<Track*>(rtv->route().get());
InterThreadInfo itt;
@@ -287,7 +289,7 @@ Editor::write_audio_selection (TimeSelection& ts)
if (atv->is_audio_track()) {
- Playlist* playlist = atv->get_diskstream()->playlist();
+ AudioPlaylist* playlist = dynamic_cast<AudioPlaylist*>(atv->get_diskstream()->playlist());
if (playlist && write_audio_range (*playlist, atv->get_diskstream()->n_channels(), ts) == 0) {
ret = -1;
@@ -300,7 +302,7 @@ Editor::write_audio_selection (TimeSelection& ts)
}
bool
-Editor::write_audio_range (Playlist& playlist, uint32_t channels, list<AudioRange>& range)
+Editor::write_audio_range (AudioPlaylist& playlist, uint32_t channels, list<AudioRange>& range)
{
AudioFileSource* fs;
const jack_nframes_t chunk_size = 4096;
@@ -435,7 +437,7 @@ Editor::write_selection ()
{
if (!selection->time.empty()) {
write_audio_selection (selection->time);
- } else if (!selection->audio_regions.empty()) {
- write_region_selection (selection->audio_regions);
+ } else if (!selection->regions.empty()) {
+ write_region_selection (selection->regions);
}
}