[ardour-dev] new feature: export all ranges
Andre Raue
dawng at raue.info
Tue Jan 3 06:18:18 PST 2006
Taybin Rutkin wrote:
> Could you resend your patch in unified diff format using 'diff -u'?
> It's much easier to read.
>
You'll find it below for 6), 7) and 8)...
Greetings
Andre
6) cvs diff against 0.99 for the current alpha-version
------------------------------------------------------
Index: gtk_ardour/SConscript
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/SConscript,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gtk_ardour/SConscript 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/SConscript 2 Jan 2006 10:15:55 -0000 1.2
@@ -92,6 +92,7 @@
editor_tempodisplay.cc
editor_timefx.cc
export_dialog.cc
+session_export_dialog.cc
gain_automation_time_axis.cc
gain_meter.cc
ghostregion.cc
Index: gtk_ardour/ardour_ui_ed.cc
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/ardour_ui_ed.cc,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- gtk_ardour/ardour_ui_ed.cc 12 Dec 2005 21:15:42 -0000 1.1
+++ gtk_ardour/ardour_ui_ed.cc 16 Dec 2005 22:30:37 -0000 1.3
@@ -132,6 +132,7 @@
export_menu->set_name ("ArdourContextMenu");
export_items.push_back (MenuElem (_("Export session to
audiofile..."), slot (*editor, &PublicEditor::export_session)));
export_items.push_back (MenuElem (_("Export range to audiofile..."),
slot (*editor, &PublicEditor::export_selection)));
+ export_items.push_back (MenuElem (_("Export all ranges..."), slot
(*editor, &PublicEditor::export_ranges)));
// export_items.back()->set_sensitive (false);
session_items.push_back (MenuElem (_("Export"), *export_menu));
@@ -312,4 +313,3 @@
break;
}
}
-
Index: gtk_ardour/editor.h
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/editor.h,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- gtk_ardour/editor.h 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/editor.h 2 Jan 2006 10:15:56 -0000 1.3
@@ -91,6 +91,7 @@
class AutomationLine;
class UIExportSpecification;
class ExportDialog;
+class SessionExportDialog;
class Selection;
class TimeSelection;
class TrackSelection;
@@ -228,6 +229,7 @@
void export_session();
void export_selection();
+ void export_ranges();
/* this is what actually does it */
@@ -1594,6 +1596,7 @@
/* audio export */
ExportDialog *export_dialog;
+ SessionExportDialog *session_export_dialog;
void export_range (jack_nframes_t start, jack_nframes_t end);
int write_region_selection(AudioRegionSelection&);
Index: gtk_ardour/editor_export_audio.cc
===================================================================
RCS file:
/home/andre/cvs_repository/Ardour/gtk_ardour/editor_export_audio.cc,v
retrieving revision 1.1
retrieving revision 1.4
diff -u -r1.1 -r1.4
--- gtk_ardour/editor_export_audio.cc 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/editor_export_audio.cc 2 Jan 2006 10:15:56 -0000 1.4
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <climits>
#include "export_dialog.h"
+#include "session_export_dialog.h"
#include "editor.h"
#include "public_editor.h"
#include "selection.h"
@@ -67,6 +68,20 @@
}
void
+Editor::export_ranges()
+{
+ if (session) {
+ if (session_export_dialog == 0) {
+ session_export_dialog = new SessionExportDialog(*this);
+ }
+
+ session_export_dialog->connect_to_session (session);
+ session_export_dialog->set_range (0, session->current_end_frame());
+ session_export_dialog->start_export();
+ }
+}
+
+void
Editor::export_range (jack_nframes_t start, jack_nframes_t end)
{
if (session) {
Index: gtk_ardour/editor_mouse.cc
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/editor_mouse.cc,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- gtk_ardour/editor_mouse.cc 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/editor_mouse.cc 16 Dec 2005 22:30:37 -0000 1.3
@@ -4202,7 +4202,7 @@
case CreateRangeMarker:
begin_reversible_command (_("new range marker"));
session->add_undo (session->locations()->get_memento());
- newloc = new Location(temp_location->start(), temp_location->end(),
"unnamed");
+ newloc = new Location(temp_location->start(), temp_location->end(),
"unnamed", Location::IsRange);
session->locations()->add (newloc, true);
session->add_redo_no_execute (session->locations()->get_memento());
commit_reversible_command ();
Index: gtk_ardour/export_dialog.h
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/export_dialog.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gtk_ardour/export_dialog.h 12 Dec 2005 21:15:42 -0000 1.1
+++ gtk_ardour/export_dialog.h 2 Jan 2006 10:15:56 -0000 1.2
@@ -112,7 +112,7 @@
void do_export_cd_markers (const string& path, const string&
cuefile_type);
void export_cue_file (ARDOUR::Locations::LocationList& locations,
const string& path);
void export_toc_file (ARDOUR::Locations::LocationList& locations,
const string& path);
- void do_export ();
+ void do_export ();
gint change_focus_policy (GdkEventAny *, bool);
gint window_closed (GdkEventAny *ignored);
@@ -129,4 +129,3 @@
};
#endif // __ardour_export_dialog_h__
-
Index: gtk_ardour/location_ui.cc
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/location_ui.cc,v
retrieving revision 1.1
retrieving revision 1.4
diff -u -r1.1 -r1.4
--- gtk_ardour/location_ui.cc 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/location_ui.cc 2 Jan 2006 13:35:14 -0000 1.4
@@ -810,7 +810,7 @@
{
if (session) {
jack_nframes_t where = session->audible_frame();
- Location *location = new Location (where, where, "unnamed");
+ Location *location = new Location (where, where, "unnamed",
Location::IsRange);
session->begin_reversible_command (_("add range marker"));
session->add_undo (session->locations()->get_memento());
session->locations()->add (location, true);
@@ -883,4 +883,3 @@
ArdourDialog::session_gone();
}
-
Index: gtk_ardour/public_editor.h
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/gtk_ardour/public_editor.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gtk_ardour/public_editor.h 12 Dec 2005 21:15:41 -0000 1.1
+++ gtk_ardour/public_editor.h 14 Dec 2005 21:50:12 -0000 1.2
@@ -80,6 +80,7 @@
virtual bool show_measures () const = 0;
virtual void export_session() = 0;
virtual void export_selection() = 0;
+ virtual void export_ranges() = 0;
virtual void add_toplevel_controls (Gtk::Container&) = 0;
virtual void set_zoom_focus (Editing::ZoomFocus) = 0;
virtual Editing::ZoomFocus get_zoom_focus () const = 0;
Index: libs/ardour/ardour/location.h
===================================================================
RCS file: /home/andre/cvs_repository/Ardour/libs/ardour/ardour/location.h,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- libs/ardour/ardour/location.h 12 Dec 2005 21:15:42 -0000 1.1
+++ libs/ardour/ardour/location.h 16 Dec 2005 22:30:37 -0000 1.3
@@ -50,7 +50,8 @@
IsAutoLoop = 0x4,
IsHidden = 0x8,
IsCDMarker = 0x10,
- IsEnd = 0x20
+ IsEnd = 0x20,
+ IsRange = 0x40
};
Location (jack_nframes_t sample_start,
@@ -95,6 +96,7 @@
bool is_hidden () { return _flags & IsHidden; }
bool is_cd_marker () { return _flags & IsCDMarker; }
bool is_end() { return _flags & IsEnd; }
+ bool is_range() { return _flags & IsRange; }
SigC::Signal1<void,Location*> name_changed;
SigC::Signal1<void,Location*> end_changed;
7) diff of new file session_export_dialog.cc against export_dialog.cc
---------------------------------------------------------------------
--- gtk_ardour/export_dialog.cc 2005-10-27 21:16:33.000000000 +0200
+++ gtk_ardour/session_export_dialog.cc 2006-01-02 11:02:40.000000000 +0100
@@ -37,7 +37,7 @@
#include <ardour/gdither.h>
#include <ardour/utils.h>
-#include "export_dialog.h"
+#include "session_export_dialog.h"
#include "check_mark.h"
#include "ardour_ui.h"
#include "public_editor.h"
@@ -48,10 +48,12 @@
#define FRAME_SHADOW_STYLE GTK_SHADOW_IN
#define FRAME_NAME "BaseFrame"
-GdkPixmap* ExportDialog::check_pixmap = 0;
-GdkPixmap* ExportDialog::check_mask = 0;
-GdkPixmap* ExportDialog::empty_pixmap = 0;
-GdkPixmap* ExportDialog::empty_mask = 0;
+void frames_to_cd_frames_string (char*, jack_nframes_t, jack_nframes_t);
+
+GdkPixmap* SessionExportDialog::check_pixmap = 0;
+GdkPixmap* SessionExportDialog::check_mask = 0;
+GdkPixmap* SessionExportDialog::empty_pixmap = 0;
+GdkPixmap* SessionExportDialog::empty_mask = 0;
using namespace std;
@@ -99,7 +101,7 @@
0
};
-ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
+SessionExportDialog::SessionExportDialog(PublicEditor& e, AudioRegion* r)
: ArdourDialog ("export dialog"),
editor (e),
format_table (9, 2),
@@ -156,7 +158,7 @@
master_selector.set_column_title (0, _("Output"));
master_selector.column_titles_show ();
master_selector.set_selection_mode (GTK_SELECTION_MULTIPLE);
- master_selector.button_press_event.connect (slot (*this,
&ExportDialog::master_selector_button_press_event));
+ master_selector.button_press_event.connect (slot (*this,
&SessionExportDialog::master_selector_button_press_event));
track_selector.set_name ("ExportTrackSelector");
track_selector.set_usize (-1, 130);
@@ -168,7 +170,7 @@
track_selector.set_column_title (0, _("Track"));
track_selector.column_titles_show ();
track_selector.set_selection_mode (GTK_SELECTION_MULTIPLE);
- track_selector.button_press_event.connect (slot (*this,
&ExportDialog::track_selector_button_press_event));
+ track_selector.button_press_event.connect (slot (*this,
&SessionExportDialog::track_selector_button_press_event));
check_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL,
gtk_widget_get_colormap(GTK_WIDGET(track_selector.gtkobj())),
@@ -214,7 +216,7 @@
vpacker.pack_start (hpacker, true, true);
track_selector_button.set_name ("EditorGTKButton");
- track_selector_button.clicked.connect (slot (*this,
&ExportDialog::track_selector_button_click));
+ track_selector_button.clicked.connect (slot (*this,
&SessionExportDialog::track_selector_button_click));
vpacker.pack_start (button_box, false, false);
vpacker.pack_start (progress_bar, false, false);
@@ -378,21 +380,21 @@
cancel_button.set_name ("EditorGTKButton");
file_entry.set_name ("ExportFileDisplay");
- delete_event.connect (slot (*this, &ExportDialog::window_closed));
- ok_button.clicked.connect (slot (*this, &ExportDialog::do_export));
- cancel_button.clicked.connect (slot (*this, &ExportDialog::end_dialog));
+ delete_event.connect (slot (*this, &SessionExportDialog::window_closed));
+ ok_button.clicked.connect (slot (*this, &SessionExportDialog::do_export));
+ cancel_button.clicked.connect (slot (*this,
&SessionExportDialog::end_dialog));
file_browse_button.set_name ("EditorGTKButton");
- file_browse_button.clicked.connect (slot (*this,
&ExportDialog::initiate_browse));
+ file_browse_button.clicked.connect (slot (*this,
&SessionExportDialog::initiate_browse));
- channel_count_combo.get_popwin()->unmap_event.connect (slot (*this,
&ExportDialog::channels_chosen));
- bitdepth_format_combo.get_popwin()->unmap_event.connect (slot (*this,
&ExportDialog::bitdepth_chosen));
- header_format_combo.get_popwin()->unmap_event.connect (slot (*this,
&ExportDialog::header_chosen));
- sample_rate_combo.get_popwin()->unmap_event.connect (slot (*this,
&ExportDialog::sample_rate_chosen));
- cue_file_combo.get_popwin()->unmap_event.connect (slot (*this,
&ExportDialog::cue_file_type_chosen));
+ channel_count_combo.get_popwin()->unmap_event.connect (slot (*this,
&SessionExportDialog::channels_chosen));
+ bitdepth_format_combo.get_popwin()->unmap_event.connect (slot (*this,
&SessionExportDialog::bitdepth_chosen));
+ header_format_combo.get_popwin()->unmap_event.connect (slot (*this,
&SessionExportDialog::header_chosen));
+ sample_rate_combo.get_popwin()->unmap_event.connect (slot (*this,
&SessionExportDialog::sample_rate_chosen));
+ cue_file_combo.get_popwin()->unmap_event.connect (slot (*this,
&SessionExportDialog::cue_file_type_chosen));
}
-ExportDialog::~ExportDialog()
+SessionExportDialog::~SessionExportDialog()
{
if (file_selector) {
delete file_selector;
@@ -400,7 +402,7 @@
}
void
-ExportDialog::connect_to_session (Session *s)
+SessionExportDialog::connect_to_session (Session *s)
{
session = s;
session->going_away.connect (slot (*this, &Window::hide_all));
@@ -435,7 +437,7 @@
}
void
-ExportDialog::set_state()
+SessionExportDialog::set_state()
{
XMLNode* node = session->instant_xml(X_("ExportDialog"),
session->path());
XMLProperty* prop;
@@ -551,7 +553,7 @@
}
void
-ExportDialog::save_state()
+SessionExportDialog::save_state()
{
if (!session) {
return;
@@ -589,7 +591,7 @@
}
void
-ExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
+SessionExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
{
spec.start_frame = start;
spec.end_frame = end;
@@ -601,42 +603,27 @@
}
gint
-ExportDialog::progress_timeout ()
+SessionExportDialog::progress_timeout ()
{
progress_bar.set_percentage (spec.progress);
return TRUE;
}
void*
-ExportDialog::_export_region_thread (void *arg)
+SessionExportDialog::_export_region_thread (void *arg)
{
PBD::ThreadCreated (pthread_self(), X_("Export Region"));
- static_cast<ExportDialog*>(arg)->export_region ();
+ static_cast<SessionExportDialog*>(arg)->export_region ();
return 0;
}
void
-ExportDialog::export_region ()
+SessionExportDialog::export_region ()
{
audio_region->exportme (*session, spec);
}
-void
-frames_to_cd_frames_string (char* buf, jack_nframes_t when,
jack_nframes_t fr)
-{
-
- long unsigned int remainder;
- int mins, secs, frames;
-
- mins = when / (60 * fr);
- remainder = when - (mins * 60 * fr);
- secs = remainder / fr;
- remainder -= secs * fr;
- frames = remainder / (fr / 75);
- sprintf (buf, " %02d:%02d:%02d", mins, secs, frames);
-
-}
struct LocationSortByStart {
bool operator() (Location *a, Location *b) {
@@ -645,7 +632,7 @@
};
void
-ExportDialog::export_toc_file (Locations::LocationList& locations,
const string& path)
+SessionExportDialog::export_toc_file (Locations::LocationList&
locations, const string& path)
{
string filepath = path + ".toc";
@@ -768,7 +755,7 @@
}
void
-ExportDialog::export_cue_file (Locations::LocationList& locations,
const string& path)
+SessionExportDialog::export_cue_file (Locations::LocationList&
locations, const string& path)
{
string filepath = path + ".cue";
ofstream out (filepath.c_str());
@@ -891,36 +878,22 @@
}
void
-ExportDialog::do_export_cd_markers (const string& path,const string&
cuefile_type)
+SessionExportDialog::do_export_cd_markers (const string& path,const
string& cuefile_type)
{
if (cuefile_type == "TOC") {
- session->locations()->apply (*this, &ExportDialog::export_toc_file,
path);
+ session->locations()->apply (*this,
&SessionExportDialog::export_toc_file, path);
} else {
- session->locations()->apply (*this, &ExportDialog::export_cue_file,
path);
+ session->locations()->apply (*this,
&SessionExportDialog::export_cue_file, path);
}
}
-void
-ExportDialog::do_export ()
-{
+/*
+ initializes spec, so that the export of a range can start
+*/
+void SessionExportDialog::initSpec(AudioExportSpecification &spec){
using namespace CList_Helpers;
-
- ok_button.set_sensitive(false);
- save_state();
-
- if (cue_file_combo.get_entry()->get_text () != _("None")) {
- do_export_cd_markers (file_entry.get_text(),
cue_file_combo.get_entry()->get_text ());
- }
-
- if (cuefile_only_checkbox.get_active()) {
- end_dialog ();
- return;
- }
-
- set_modal (true);
- spec.path = file_entry.get_text();
spec.progress = 0;
spec.running = true;
spec.stop = false;
@@ -1046,25 +1019,39 @@
++chan;
}
}
+}
- progress_connection = Main::timeout.connect (slot (*this,
&ExportDialog::progress_timeout), 100);
- cancel_label.set_text (_("Stop Export"));
+void
+SessionExportDialog::do_export ()
+{
+ ok_button.set_sensitive(false);
+ save_state();
- if (!audio_region) {
- if (session->start_audio_export (spec)) {
- goto out;
- }
- } else {
- pthread_t thr;
- pthread_create_and_store ("region export", &thr, 0,
ExportDialog::_export_region_thread, this);
+ if (cue_file_combo.get_entry()->get_text () != _("None")) {
+ do_export_cd_markers (file_entry.get_text(),
cue_file_combo.get_entry()->get_text ());
}
- gtk_main_iteration ();
- while (spec.running) {
- if (gtk_events_pending()) {
- gtk_main_iteration ();
- } else {
- usleep (10000);
+ if (cuefile_only_checkbox.get_active()) {
+ end_dialog ();
+ return;
+ }
+
+ set_modal (true);
+
+ progress_connection = Main::timeout.connect (slot (*this,
&SessionExportDialog::progress_timeout), 100);
+ cancel_label.set_text (_("Stop Export"));
+
+ session->locations()->apply(*this,
&SessionExportDialog::process_audioranges_export, spec);
+#if 0
+ goto out;
+#endif
+
+ gtk_main_iteration();
+ while(spec.running){
+ if(gtk_events_pending()){
+ gtk_main_iteration();
+ }else {
+ usleep(10000);
}
}
@@ -1074,10 +1061,49 @@
}
-void
-ExportDialog::end_dialog ()
+void
+SessionExportDialog::process_audioranges_export(Locations::LocationList&
locations, ARDOUR::AudioExportSpecification& spec)
{
+ Locations::LocationList::iterator locationIter;
+
+ //XXX: ToDo: check somewhere if the given destination path is existing
+ // and if it is a path
+
+ for (locationIter = locations.begin(); locationIter !=
locations.end(); ++locationIter) {
+ Location *currentLocation = (*locationIter);
+
+ if(currentLocation->is_range()){
+ //XXX: ToDo: check if file_entry has "/" at the end
+ initSpec(spec);
+ spec.path = file_entry.get_text() + '/' + currentLocation->name() +
".wav";
+ spec.start_frame = currentLocation->start();
+ spec.end_frame = currentLocation->end();
+
+ session->request_locate(spec.start_frame, false);
+
+ //XXX: ToDo: what to do when start_audio_export fails? before it was
+ // goto out; in method do_export
+ session->start_audio_export(spec);
+
+ // wait until export of this range finished
+ gtk_main_iteration();
+ while(spec.running){
+ if(gtk_events_pending()){
+ gtk_main_iteration();
+ }else {
+ usleep(10000);
+ }
+ }
+
+ session->engine().freewheel (false);
+ }
+ }
+}
+
+void
+SessionExportDialog::end_dialog ()
+{
if (spec.running) {
spec.stop = true;
@@ -1103,7 +1129,7 @@
}
void
-ExportDialog::start_export ()
+SessionExportDialog::start_export ()
{
if (session == 0) {
return;
@@ -1139,7 +1165,7 @@
}
gint
-ExportDialog::header_chosen (GdkEventAny* ignored)
+SessionExportDialog::header_chosen (GdkEventAny* ignored)
{
if (sndfile_header_format_from_string
(header_format_combo.get_entry()->get_text ()) == SF_FORMAT_WAV) {
endian_format_combo.set_sensitive (false);
@@ -1150,7 +1176,7 @@
}
gint
-ExportDialog::bitdepth_chosen (GdkEventAny* ignored)
+SessionExportDialog::bitdepth_chosen (GdkEventAny* ignored)
{
int format = sndfile_bitdepth_format_from_string
(bitdepth_format_combo.get_entry()->get_text ());
switch (format) {
@@ -1169,7 +1195,7 @@
}
gint
-ExportDialog::cue_file_type_chosen (GdkEventAny* ignored)
+SessionExportDialog::cue_file_type_chosen (GdkEventAny* ignored)
{
if (cue_file_combo.get_entry()->get_text () != "None") {
cuefile_only_checkbox.set_sensitive (true);
@@ -1181,7 +1207,7 @@
}
gint
-ExportDialog::sample_rate_chosen (GdkEventAny* ignored)
+SessionExportDialog::sample_rate_chosen (GdkEventAny* ignored)
{
string sr_str = sample_rate_combo.get_entry()->get_text();
jack_nframes_t rate;
@@ -1212,7 +1238,7 @@
}
gint
-ExportDialog::channels_chosen (GdkEventAny* ignored)
+SessionExportDialog::channels_chosen (GdkEventAny* ignored)
{
bool mono;
@@ -1290,7 +1316,7 @@
}
gint
-ExportDialog::track_selector_button_press_event (GdkEventButton* ev)
+SessionExportDialog::track_selector_button_press_event (GdkEventButton* ev)
{
gint row, col;
@@ -1314,7 +1340,7 @@
}
gint
-ExportDialog::master_selector_button_press_event (GdkEventButton* ev)
+SessionExportDialog::master_selector_button_press_event
(GdkEventButton* ev)
{
gint row, col;
@@ -1338,35 +1364,35 @@
}
gint
-ExportDialog::window_closed (GdkEventAny *ignored)
+SessionExportDialog::window_closed (GdkEventAny *ignored)
{
end_dialog ();
return TRUE;
}
void
-ExportDialog::initiate_browse ()
+SessionExportDialog::initiate_browse ()
{
if (file_selector == 0) {
file_selector = new FileSelection;
file_selector->set_modal (true);
- file_selector->get_cancel_button()->clicked.connect (bind (slot
(*this, &ExportDialog::finish_browse), -1));
- file_selector->get_ok_button()->clicked.connect (bind (slot (*this,
&ExportDialog::finish_browse), 1));
- file_selector->map_event.connect (bind (slot (*this,
&ExportDialog::change_focus_policy), true));
- file_selector->unmap_event.connect (bind (slot (*this,
&ExportDialog::change_focus_policy), false));
+ file_selector->get_cancel_button()->clicked.connect (bind (slot
(*this, &SessionExportDialog::finish_browse), -1));
+ file_selector->get_ok_button()->clicked.connect (bind (slot (*this,
&SessionExportDialog::finish_browse), 1));
+ file_selector->map_event.connect (bind (slot (*this,
&SessionExportDialog::change_focus_policy), true));
+ file_selector->unmap_event.connect (bind (slot (*this,
&SessionExportDialog::change_focus_policy), false));
}
file_selector->show_all ();
}
gint
-ExportDialog::change_focus_policy (GdkEventAny *ev, bool yn)
+SessionExportDialog::change_focus_policy (GdkEventAny *ev, bool yn)
{
Keyboard::the_keyboard().allow_focus (yn);
return FALSE;
}
void
-ExportDialog::finish_browse (int status)
+SessionExportDialog::finish_browse (int status)
{
if (file_selector) {
if (status > 0) {
@@ -1381,7 +1407,7 @@
}
void
-ExportDialog::track_selector_button_click ()
+SessionExportDialog::track_selector_button_click ()
{
if (track_scroll.is_visible ()) {
track_scroll.hide ();
8) diff of new file session_export_dialog.h against export_dialog.h
-------------------------------------------------------------------
--- gtk_ardour/export_dialog.h 2005-12-17 21:55:56.000000000 +0100
+++ gtk_ardour/session_export_dialog.h 2006-01-02 10:40:24.000000000 +0100
@@ -17,8 +17,8 @@
*/
-#ifndef __ardour_export_dialog_h__
-#define __ardour_export_dialog_h__
+#ifndef __ardour_session_export_dialog_h__
+#define __ardour_session_export_dialog_h__
#include <gtk--.h>
@@ -34,11 +34,11 @@
class AudioRegion;
}
-class ExportDialog : public ArdourDialog
+class SessionExportDialog : public ArdourDialog
{
public:
- ExportDialog (PublicEditor&, ARDOUR::AudioRegion* r = 0);
- ~ExportDialog ();
+ SessionExportDialog (PublicEditor&, ARDOUR::AudioRegion* r = 0);
+ ~SessionExportDialog ();
void connect_to_session (ARDOUR::Session*);
void set_range (jack_nframes_t start, jack_nframes_t end);
@@ -109,10 +109,13 @@
gint track_selector_button_press_event (GdkEventButton *ev);
gint master_selector_button_press_event (GdkEventButton *ev);
- void do_export_cd_markers (const string& path, const string&
cuefile_type);
+ void do_export_cd_markers (const string& path, const string&
cuefile_type);
+ void initSpec(ARDOUR::AudioExportSpecification &spec);
void export_cue_file (ARDOUR::Locations::LocationList& locations,
const string& path);
void export_toc_file (ARDOUR::Locations::LocationList& locations,
const string& path);
void do_export ();
+ void process_audioranges_export(ARDOUR::Locations::LocationList&
locations, ARDOUR::AudioExportSpecification& spec);
+
gint change_focus_policy (GdkEventAny *, bool);
gint window_closed (GdkEventAny *ignored);
@@ -128,4 +131,4 @@
void export_region ();
};
-#endif // __ardour_export_dialog_h__
+#endif // __ardour_session_export_dialog_h__
More information about the ardour-dev
mailing list