merge pre- and post-fader processor boxes; start removing Placement (not finished...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jul 2009 00:26:28 +0000 (00:26 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jul 2009 00:26:28 +0000 (00:26 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5344 d708f5d6-7413-0410-9779-e7cbd77b26cf

59 files changed:
SConstruct
gtk2_ardour/ardour_ui_options.cc
gtk2_ardour/au_pluginui.h
gtk2_ardour/au_pluginui.mm
gtk2_ardour/gain_meter.cc
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/lv2_plugin_ui.h
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_strip.h
gtk2_ardour/nag.cc
gtk2_ardour/plugin_selector.cc
gtk2_ardour/plugin_ui.cc
gtk2_ardour/plugin_ui.h
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h
gtk2_ardour/route_params_ui.cc
gtk2_ardour/route_params_ui.h
gtk2_ardour/route_time_axis.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/startup.cc
gtk2_ardour/wscript
libs/ardour/ardour/buffer_set.h
libs/ardour/ardour/internal_return.h
libs/ardour/ardour/internal_send.h
libs/ardour/ardour/location.h
libs/ardour/ardour/plugin_manager.h
libs/ardour/ardour/processor.h
libs/ardour/ardour/route.h
libs/ardour/ardour/utils.h
libs/ardour/audio_unit.cc
libs/ardour/audioengine.cc
libs/ardour/audiofilesource.cc
libs/ardour/buffer_set.cc
libs/ardour/delivery.cc
libs/ardour/globals.cc
libs/ardour/import.cc
libs/ardour/internal_return.cc
libs/ardour/internal_send.cc
libs/ardour/location.cc
libs/ardour/plugin.cc
libs/ardour/plugin_insert.cc
libs/ardour/plugin_manager.cc
libs/ardour/port.cc
libs/ardour/processor.cc
libs/ardour/route.cc
libs/ardour/session.cc
libs/ardour/session_state.cc
libs/ardour/session_time.cc
libs/ardour/sndfilesource.cc
libs/ardour/source_factory.cc
libs/ardour/utils.cc
libs/ardour/wscript
libs/midi++2/wscript
libs/pbd/mountpoint.cc
libs/pbd/pbd/stacktrace.h
libs/pbd/wscript
libs/rubberband/wscript
libs/sigc++2/missing
wscript

index 1d14681147e72b4310d6a9fa402038dc5b49200d..77af788658fc6c59e260879f5200e587068f99a3 100644 (file)
@@ -1112,6 +1112,8 @@ if env['SYSLIBS']:
     libraries['sigc2'].ParseConfig('pkg-config --cflags --libs sigc++-2.0')
     libraries['glibmm2'] = LibraryInfo()
     libraries['glibmm2'].ParseConfig('pkg-config --cflags --libs glibmm-2.4')
+    libraries['giomm'] = LibraryInfo()
+    libraries['giomm'].ParseConfig('pkg-config --cflags --libs giomm-2.4')
     libraries['cairo'] = LibraryInfo()
     libraries['cairo'].ParseConfig('pkg-config --cflags --libs cairo')
     libraries['cairomm'] = LibraryInfo()
@@ -1189,6 +1191,9 @@ else:
     libraries['glibmm2'] = LibraryInfo(LIBS='glibmm2',
                                     LIBPATH='#libs/glibmm2',
                                     CPPPATH='#libs/glibmm2/glib')
+    libraries['giomm'] = LibraryInfo(LIBS='giomm',
+                                    LIBPATH='#libs/glibmm2',
+                                    CPPPATH='#libs/glibmm2/gio')
     libraries['pangomm'] = LibraryInfo(LIBS='pangomm',
                                     LIBPATH='#libs/gtkmm2/pango',
                                     CPPPATH='#libs/gtkmm2/pango')
index f7408c9055325cc2838ced64e8faec8643a3d200..bade3906a406fe245d182683d9a60a462ea4039c 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include "pbd/convert.h"
 #include "pbd/stacktrace.h"
 
index 55c65d629136587e16827525bc9e6a6f6092a52f..41f15a80ba30711a71f725bd990580e79321fb40 100644 (file)
@@ -70,7 +70,6 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
        /* Cocoa */
 
        NSWindow*           cocoa_window;
-       NSScrollView*       scroll_view;
        NSView*             au_view;
 
        /* Carbon */
index a46021f66fd04cd952133b0f65ea18c61ef16a89..248f9d62dd13dc37dfb90eade7e23a4ece6a1732 100644 (file)
@@ -129,8 +129,12 @@ AUPluginUI::~AUPluginUI ()
                DisposeWindow (carbon_window);
        }
 
-       if (packView && packView != au_view) {
-               [packView release];
+       if (packView) {
+               /* remove whatever we packed into low_box so that GTK doesn't
+                  mess with it.
+               */
+
+               [packView removeFromSuperview];
        }
 }
 
@@ -284,46 +288,11 @@ AUPluginUI::create_cocoa_view ()
                [(AUGenericView *)au_view setShowsExpertParameters:YES];
        }
 
-       NSRect packFrame;
-
+       packView = au_view;
+       
        // Get the size of the new AU View's frame 
+       NSRect packFrame;
        packFrame = [au_view frame];
-
-       packFrame.origin.x = 0;
-       packFrame.origin.y = 0;
-
-       if (packFrame.size.width > 500 || packFrame.size.height > 500) {
-               
-               /* its too big - use a scrollview */
-
-               NSRect frameRect = [[cocoa_window contentView] frame];
-               scroll_view = [[[NSScrollView alloc] initWithFrame:frameRect] autorelease];
-               [scroll_view setDrawsBackground:NO];
-               [scroll_view setHasHorizontalScroller:YES];
-               [scroll_view setHasVerticalScroller:YES];
-
-               packFrame.size = [NSScrollView  frameSizeForContentSize:packFrame.size
-                                   hasHorizontalScroller:[scroll_view hasHorizontalScroller]
-                                   hasVerticalScroller:[scroll_view hasVerticalScroller]
-                                   borderType:[scroll_view borderType]];
-               
-               // Create a new frame with same origin as current
-               // frame but size equal to the size of the new view
-               NSRect newFrame;
-               newFrame.origin = [scroll_view frame].origin;
-               newFrame.size = packFrame.size;
-               
-               // Set the new frame and document views on the scroll view
-               [scroll_view setFrame:newFrame];
-               [scroll_view setDocumentView:au_view];
-               
-               packView = scroll_view;
-
-       } else {
-
-               packView = au_view;
-       }
-
        prefwidth = packFrame.size.width;
        prefheight = packFrame.size.height;
 
index 82e829c6f36a322acb25fc7e013aa9a09aa00722..4f6b48666cae49287a69fefc691bc0e366e09ddd 100644 (file)
@@ -166,6 +166,11 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
                             boost::shared_ptr<Automatable> gc_owner)
 {
        connections.clear ();
+
+       cerr << "GM reset controls for " << r->name()
+            << " pm = " << pm 
+            << " autocontrol = " << gc 
+            << endl;
        
        if (!pm && !gc) {
                level_meter->set_meter (0);
@@ -417,11 +422,11 @@ GainMeterBase::set_fader_name (const char * name)
 void
 GainMeterBase::update_gain_sensitive ()
 {
-       static_cast<Gtkmm2ext::SliderController*>(gain_slider)->set_sensitive (
-                       !(_gain_control->alist()->automation_state() & Play));
+       bool x = !(_gain_control->alist()->automation_state() & Play);
+       cerr << " for " << _route->name() << " set gain sensitive to " << x << endl;
+       static_cast<Gtkmm2ext::SliderController*>(gain_slider)->set_sensitive (x);
 }
 
-
 static MeterPoint
 next_meter_point (MeterPoint mp)
 {
@@ -826,6 +831,9 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
        if (!r->is_hidden()) {
                fader_vbox->pack_start (gain_automation_state_button, false, false, 0);
        }
+
+       setup_meters ();
+       hbox.show_all ();
 }
 
 int
index 0184635b60840f6969b9f53a2c247ec9b503611e..77a3967f1e9352dce50e02c7bc46509aee387e66 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <climits>
 #include <cerrno>
 #include <cmath>
index 0ddc86b217f73d4e8332bfa8c1fb6c6201cc100f..622320b831403db66e1e6f7742049a90c03c518d 100644 (file)
 #ifndef __ardour_lv2_plugin_ui_h__
 #define __ardour_lv2_plugin_ui_h__
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <vector>
 #include <map>
 #include <list>
index a862b15ccd524f047c450ff572d59af6c7e060d2..625b2d4faa312dacbb49eb8f40c18a89cf706497 100644 (file)
@@ -78,8 +78,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, bool in_mixer)
        , RouteUI (sess)
        ,_mixer(mx)
        , _mixer_owned (in_mixer)
-       , pre_processor_box (PreFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
-       , post_processor_box (PostFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
+       , processor_box (sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
        , gpm (sess)
        , panners (sess)
        , button_table (3, 2)
@@ -105,8 +104,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
        , RouteUI (sess)
        ,_mixer(mx)
        , _mixer_owned (in_mixer)
-       , pre_processor_box (PreFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
-       , post_processor_box (PostFader, sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
+       , processor_box (sess, mx.plugin_selector(), mx.selection(), this, in_mixer)
        , gpm (sess)
        , panners (sess)
        , button_table (3, 2)
@@ -231,11 +229,10 @@ MixerStrip::init ()
 
        global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK);
        global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK);
-       global_vpacker.pack_start (pre_processor_box, true, true);
+       global_vpacker.pack_start (processor_box, true, true);
        global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK);
        global_vpacker.pack_start (gain_meter_alignment,Gtk::PACK_SHRINK);
        global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK);
-       global_vpacker.pack_start (post_processor_box, true, true);
        if (!is_midi_track()) {
                global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
        }
@@ -341,8 +338,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
 
        panners.set_panner (rt->main_outs()->panner());
        gpm.set_controls (rt, rt->shared_peak_meter(), rt->gain_control(), rt->amp());
-       pre_processor_box.set_route (rt);
-       post_processor_box.set_route (rt);
+       processor_box.set_route (rt);
 
        if (set_color_from_route()) {
                set_color (unique_random_color());
@@ -436,8 +432,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
 
        /* now force an update of all the various elements */
 
-       pre_processor_box.update();
-       post_processor_box.update();
+       processor_box.update();
        mute_changed (0);
        solo_changed (0);
        name_changed ();
@@ -454,7 +449,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
 
        add_events (Gdk::BUTTON_RELEASE_MASK);
 
-       pre_processor_box.show();
+       processor_box.show();
 
        if (!route()->is_master() && !route()->is_control()) {
                /* we don't allow master or control routes to be hidden */
@@ -469,11 +464,10 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        button_table.show();
        middle_button_table.show();
        bottom_button_table.show();
-       pre_processor_box.show_all ();
+       processor_box.show_all ();
        gpm.show_all ();
        panners.show_all ();
        gain_meter_alignment.show ();
-       post_processor_box.show_all ();
        gain_unit_button.show();
        gain_unit_label.show();
        meter_point_button.show();
@@ -525,8 +519,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
 
        gpm.set_width (w);
        panners.set_width (w);
-       pre_processor_box.set_width (w);
-       post_processor_box.set_width (w);
+       processor_box.set_width (w);
 
        boost::shared_ptr<AutomationList> gain_automation = _route->gain_control()->alist();
 
@@ -1273,12 +1266,10 @@ MixerStrip::map_frozen ()
        if (at) {
                switch (at->freeze_state()) {
                case AudioTrack::Frozen:
-                       pre_processor_box.set_sensitive (false);
-                       post_processor_box.set_sensitive (false);
+                       processor_box.set_sensitive (false);
                        break;
                default:
-                       pre_processor_box.set_sensitive (true);
-                       post_processor_box.set_sensitive (true);
+                       processor_box.set_sensitive (true);
                        // XXX need some way, maybe, to retoggle redirect editors
                        break;
                }
@@ -1415,6 +1406,9 @@ MixerStrip::switch_io (boost::shared_ptr<Route> target)
        
        _current_delivery = _route->internal_send_for (target);
 
+       cerr << "internal send from " << _route->name() << " to " << target->name() << " = " 
+            << _current_delivery << endl;
+
        if (_current_delivery) {
                send = boost::dynamic_pointer_cast<Send>(_current_delivery);
                send->set_metering (true);
index 30557b115edc229d3171c729a9fffdc7702eb5a3..f46858b2ca73a3053b9cacde89297c7addbeebfa 100644 (file)
@@ -134,8 +134,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        Gtk::Frame          global_frame;
        Gtk::VBox           global_vpacker;
 
-       ProcessorBox pre_processor_box;
-       ProcessorBox post_processor_box;
+       ProcessorBox processor_box;
        GainMeter   gpm;
        PannerUI    panners;
        
index 4dab7e69b74fbe7549229d5e3a4ae0975275051a..f63e78b20f6cd016213fefb4ce0f6165bbe2b7a8 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <fstream>
 #include <gtkmm/stock.h>
 
index 705146eccd048e03360a235164444498cbf91ba7..d87fad611a23b5d7c5cd0b43b7809dab3323803b 100644 (file)
@@ -16,6 +16,9 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
 
 #include <cstdio>
 #include <lrdf.h>
index f398c23d7c9cf0d81fe36d446e83d5e37c6f10e6..527c54876e2628abb4d77c737536ee2fc3f432be 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <climits>
 #include <cerrno>
 #include <cmath>
@@ -383,8 +387,9 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
        ARDOUR_UI::instance()->set_tip (&bypass_button, _("Click to enable/disable this plugin"), "");
 
        plugin_analysis_expander.property_expanded().signal_changed().connect( mem_fun(*this, &PlugUIBase::toggle_plugin_analysis));
-
        plugin_analysis_expander.set_expanded(false);
+
+       insert->GoingAway.connect (mem_fun (*this, &PlugUIBase::plugin_going_away));
 }
 
 PlugUIBase::~PlugUIBase()
@@ -392,6 +397,14 @@ PlugUIBase::~PlugUIBase()
        delete latency_gui;
 }
 
+void
+PlugUIBase::plugin_going_away ()
+{
+       /* drop references to the plugin/insert */
+       insert.reset ();
+       plugin.reset ();
+}
+
 void
 PlugUIBase::set_latency_label ()
 {
index 4ad7c213ac599acc21dc0e321181b8f8c2eb551d..93059bb2bdec78d48f24f21814b5f3ac5750db57 100644 (file)
 #ifndef __ardour_plugin_ui_h__
 #define __ardour_plugin_ui_h__
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <vector>
 #include <map>
 #include <list>
@@ -112,6 +116,7 @@ class PlugUIBase : public virtual sigc::trackable
        void bypass_toggled();
        void toggle_plugin_analysis ();
        void processor_active_changed (boost::weak_ptr<ARDOUR::Processor> p);
+       void plugin_going_away ();
 };
 
 class GenericPluginUI : public PlugUIBase, public Gtk::VBox
index ae1d6c73abc8020da4123d897536697bca95507c..ffa73ff2b890a02e53e711506b90a60392c6411e 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "gtk2ardour-config.h"
+#endif
+
 #include <cmath>
 #include <iostream>
 #include <set>
@@ -89,12 +93,12 @@ bool ProcessorBox::get_colors = true;
 Gdk::Color* ProcessorBox::active_processor_color;
 Gdk::Color* ProcessorBox::inactive_processor_color;
 
-ProcessorBox::ProcessorBox (Placement pcmnt, Session& sess, PluginSelector &plugsel,
+ProcessorBox::ProcessorBox (Session& sess, PluginSelector &plugsel,
                            RouteRedirectSelection & rsel, MixerStrip* parent, bool owner_is_mixer)
        : _session(sess)
        , _parent_strip (parent)
        , _owner_is_mixer (owner_is_mixer)
-       , _placement(pcmnt)
+       , _placement(PreFader)
        , _plugin_selector(plugsel)
        , _rr_selection(rsel)
 {
@@ -363,7 +367,6 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev)
        boost::shared_ptr<Processor> processor;
        int ret = false;
 
-
        if (processor_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
                if ((iter = model->get_iter (path))) {
                        processor = (*iter)[columns.processor];
@@ -379,7 +382,23 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev)
 
        } else if (Keyboard::is_context_menu_event (ev)) {
 
-               show_processor_menu(ev->time);
+               /* figure out if we are above or below the fader/amp processor,
+                  and set the next insert position appropriately.
+               */
+
+               if (processor) {
+                       if (_route->processor_is_prefader (processor)) {
+                               _placement = PreFader;
+                       } else {
+                               _placement = PostFader;
+                       }
+                       cerr << "had processor " << processor->name() << " placement = " << _placement << endl;
+               } else {
+                       _placement = PostFader;
+                       cerr << "no processor, postfader\n";
+               }
+               
+               show_processor_menu (ev->time);
                ret = true;
 
        } else if (processor && Keyboard::is_button2_event (ev)
@@ -512,9 +531,8 @@ void
 ProcessorBox::choose_insert ()
 {
        boost::shared_ptr<Processor> processor (new PortInsert (_session, _route->mute_master()));
-       processor->ActiveChanged.connect (bind (
-                       mem_fun(*this, &ProcessorBox::show_processor_active),
-                       boost::weak_ptr<Processor>(processor)));
+       processor->ActiveChanged.connect (bind (mem_fun(*this, &ProcessorBox::show_processor_active),
+                                               boost::weak_ptr<Processor>(processor)));
 
        _route->add_processor (processor, _placement);
 }
@@ -651,16 +669,9 @@ ProcessorBox::redisplay_processors ()
        processor_active_connections.clear ();
        processor_name_connections.clear ();
 
-       _route->foreach_processor (_placement, mem_fun (*this, &ProcessorBox::add_processor_to_display));
+       _route->foreach_processor (mem_fun (*this, &ProcessorBox::add_processor_to_display));
 
-       switch (_placement) {
-       case PreFader:
-               build_processor_tooltip (processor_eventbox, _("Pre-fader inserts, sends & plugins:"));
-               break;
-       case PostFader:
-               build_processor_tooltip (processor_eventbox, _("Post-fader inserts, sends & plugins:"));
-               break;
-       }
+       build_processor_tooltip (processor_eventbox, _("Inserts, sends & plugins:"));
 }
 
 void
@@ -671,9 +682,11 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
                return;
        }
 
+#if 0
        if (processor == _route->amp() || !processor->visible()) {
                return;
        }
+#endif
 
        Gtk::TreeModel::Row row = *(model->append());
        row[columns.text] = processor_name (processor);
@@ -816,7 +829,7 @@ ProcessorBox::compute_processor_sort_keys ()
                our_processors.push_back ((*iter)[columns.processor]);
        }
 
-       if (_route->reorder_processors (our_processors, _placement)) {
+       if (_route->reorder_processors (our_processors)) {
 
                /* reorder failed, so redisplay */
 
index a55b49c07f45e835d04d5873d36041f43204d9f3..32a36c907701ce7eda806b5217866bd92c691cd2 100644 (file)
@@ -69,7 +69,7 @@ namespace ARDOUR {
 class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
 {
   public:
-       ProcessorBox (ARDOUR::Placement, ARDOUR::Session&, PluginSelector &, RouteRedirectSelection &, MixerStrip* parent, bool owner_is_mixer = false);
+       ProcessorBox (ARDOUR::Session&, PluginSelector &, RouteRedirectSelection &, MixerStrip* parent, bool owner_is_mixer = false);
        ~ProcessorBox ();
 
        void set_route (boost::shared_ptr<ARDOUR::Route>);
index d2fc106c429620c6d87e48020594feec692bec72..245b0019dc483f1d635a95ba0ba6b083e645da0c 100644 (file)
@@ -66,12 +66,10 @@ RouteParams_UI::RouteParams_UI ()
          track_menu(0)
        
 {
-       pre_insert_box = 0;
-       post_insert_box = 0;
+       insert_box = 0;
        _input_iosel = 0;
        _output_iosel = 0;
-       _active_pre_view = 0;
-       _active_post_view = 0;
+       _active_view = 0;
        latency_widget = 0;
 
        using namespace Notebook_Helpers;
@@ -108,8 +106,7 @@ RouteParams_UI::RouteParams_UI ()
        
        notebook.pages().push_back (TabElem (input_frame, _("Inputs")));
        notebook.pages().push_back (TabElem (output_frame, _("Outputs")));
-       notebook.pages().push_back (TabElem (pre_redir_hpane, _("Pre-fader Redirects")));
-       notebook.pages().push_back (TabElem (post_redir_hpane, _("Post-fader Redirects")));
+       notebook.pages().push_back (TabElem (redir_hpane, _("Plugins, Inserts & Sends")));
        notebook.pages().push_back (TabElem (latency_frame, _("Latency")));
 
        notebook.set_name ("InspectorNotebook");
@@ -137,8 +134,7 @@ RouteParams_UI::RouteParams_UI ()
 
        list_hpane.set_position(110);
 
-       pre_redir_hpane.set_position(110);
-       post_redir_hpane.set_position(110);
+       redir_hpane.set_position(110);
        
        //global_vpacker.pack_start (list_hpane, true, true);
        //get_vbox()->pack_start (global_vpacker);
@@ -231,39 +227,25 @@ RouteParams_UI::setup_processor_boxes()
                cleanup_processor_boxes();
                
                // construct new redirect boxes
-               pre_insert_box = new ProcessorBox(PreFader, *session, *_plugin_selector, _rr_selection, 0);
-               post_insert_box = new ProcessorBox(PostFader, *session, *_plugin_selector, _rr_selection, 0);
-  
-               pre_insert_box->set_route (_route);
-               post_insert_box->set_route (_route);
-
-               pre_redir_hpane.pack1 (*pre_insert_box);
-               post_redir_hpane.pack1 (*post_insert_box);
-
-               pre_insert_box->ProcessorSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
-               pre_insert_box->ProcessorUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
-               post_insert_box->ProcessorSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
-               post_insert_box->ProcessorUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
-
-               pre_redir_hpane.show_all();
-               post_redir_hpane.show_all();
+               insert_box = new ProcessorBox(*session, *_plugin_selector, _rr_selection, 0);
+               insert_box->set_route (_route);
+
+               redir_hpane.pack1 (*insert_box);
+
+               insert_box->ProcessorSelected.connect (mem_fun(*this, &RouteParams_UI::redirect_selected));
+               insert_box->ProcessorUnselected.connect (mem_fun(*this, &RouteParams_UI::redirect_selected));
+
+               redir_hpane.show_all();
        }
-       
 }
 
 void
 RouteParams_UI::cleanup_processor_boxes()
 {
-       if (pre_insert_box) {
-               pre_redir_hpane.remove(*pre_insert_box);
-               delete pre_insert_box;
-               pre_insert_box = 0;
-       }
-
-       if (post_insert_box) {
-               post_redir_hpane.remove(*post_insert_box);
-               delete post_insert_box;
-               post_insert_box = 0;
+       if (insert_box) {
+               redir_hpane.remove(*insert_box);
+               delete insert_box;
+               insert_box = 0;
        }
 }
 
@@ -354,39 +336,22 @@ RouteParams_UI::cleanup_io_frames()
 }
 
 void
-RouteParams_UI::cleanup_pre_view (bool stopupdate)
+RouteParams_UI::cleanup_view (bool stopupdate)
 {
-       if (_active_pre_view) {
+       if (_active_view) {
                GenericPluginUI *   plugui = 0;
                
-               if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_pre_view)) != 0) {
+               if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_view)) != 0) {
                          plugui->stop_updating (0);
                }
 
-               _pre_plugin_conn.disconnect();
-               pre_redir_hpane.remove(*_active_pre_view);
-               delete _active_pre_view;
-               _active_pre_view = 0;
+               _plugin_conn.disconnect();
+               redir_hpane.remove(*_active_view);
+               delete _active_view;
+               _active_view = 0;
        }
 }
 
-void
-RouteParams_UI::cleanup_post_view (bool stopupdate)
-{
-       if (_active_post_view) {
-               GenericPluginUI *   plugui = 0;
-               
-               if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_post_view)) != 0) {
-                         plugui->stop_updating (0);
-               }
-               _post_plugin_conn.disconnect();
-               post_redir_hpane.remove(*_active_post_view);
-               delete _active_post_view;
-               _active_post_view = 0;
-       }
-}
-
-
 void
 RouteParams_UI::route_removed (boost::shared_ptr<Route> route)
 {
@@ -406,13 +371,11 @@ RouteParams_UI::route_removed (boost::shared_ptr<Route> route)
 
        if (route == _route) {
                cleanup_io_frames();
-               cleanup_pre_view();
-               cleanup_post_view();
+               cleanup_view();
                cleanup_processor_boxes();
                
                _route.reset ((Route*) 0);
-               _pre_processor.reset ((Processor*) 0);
-               _post_processor.reset ((Processor*) 0);
+               _processor.reset ((Processor*) 0);
                update_title();
        }
 }
@@ -448,14 +411,12 @@ RouteParams_UI::session_gone ()
        route_display_model->clear();
 
        cleanup_io_frames();
-       cleanup_pre_view();
-       cleanup_post_view();
+       cleanup_view();
        cleanup_processor_boxes();
        cleanup_latency_frame ();
 
        _route.reset ((Route*) 0);
-       _pre_processor.reset ((Processor*) 0);
-       _post_processor.reset ((Processor*) 0);
+       _processor.reset ((Processor*) 0);
        update_title();
 
        ArdourDialog::session_gone();
@@ -482,8 +443,7 @@ RouteParams_UI::route_selected()
                        _route_conn.disconnect();
                        _route_ds_conn.disconnect();
                        cleanup_processor_boxes();
-                       cleanup_pre_view();
-                       cleanup_post_view();
+                       cleanup_view();
                        cleanup_io_frames();
                        cleanup_latency_frame ();
                }
@@ -510,14 +470,12 @@ RouteParams_UI::route_selected()
 
                        // remove from view
                        cleanup_io_frames();
-                       cleanup_pre_view();
-                       cleanup_post_view();
+                       cleanup_view();
                        cleanup_processor_boxes();
                        cleanup_latency_frame ();
 
                        _route.reset ((Route*) 0);
-                       _pre_processor.reset ((Processor*) 0);
-                       _post_processor.reset ((Processor *) 0);
+                       _processor.reset ((Processor*) 0);
                        track_input_label.set_text(_("NO TRACK"));
                        update_title();
                }
@@ -528,11 +486,9 @@ void
 RouteParams_UI::processors_changed ()
 {
        ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::processors_changed));
-       cleanup_pre_view();
-       cleanup_post_view();
+       cleanup_view();
        
-       _pre_processor.reset ((Processor*) 0);
-       _post_processor.reset ((Processor*) 0);
+       _processor.reset ((Processor*) 0);
 
        //update_title();
 }
@@ -553,12 +509,9 @@ RouteParams_UI::show_track_menu()
 }
 
 void
-RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert, ARDOUR::Placement place)
+RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert)
 {
-       if ((place == PreFader && _pre_processor == insert)
-           || (place == PostFader && _post_processor == insert)){
-               return;
-       }
+       Placement place = PreFader;
        
        boost::shared_ptr<Send> send;
        boost::shared_ptr<Return> retrn;
@@ -569,104 +522,52 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> insert,
 
                SendUI *send_ui = new SendUI (send, *session);
 
-               if (place == PreFader) {
-                       cleanup_pre_view();
-                       _pre_plugin_conn = send->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_pre_view = send_ui;
-                       
-                       pre_redir_hpane.add2 (*_active_pre_view);
-                       pre_redir_hpane.show_all();
-               } else {
-                       cleanup_post_view();
-                       _post_plugin_conn = send->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_post_view = send_ui;
-                       
-                       post_redir_hpane.add2 (*_active_post_view);
-                       post_redir_hpane.show_all();
-               }
+               cleanup_view();
+               _plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
+                                                             insert));
+               _active_view = send_ui;
+               
+               redir_hpane.add2 (*_active_view);
+               redir_hpane.show_all();
 
        } else if ((retrn = boost::dynamic_pointer_cast<Return> (insert)) != 0) {
 
                ReturnUI *return_ui = new ReturnUI (retrn, *session);
 
-               if (place == PreFader) {
-                       cleanup_pre_view();
-                       _pre_plugin_conn = retrn->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_pre_view = return_ui;
-                       
-                       pre_redir_hpane.add2 (*_active_pre_view);
-                       pre_redir_hpane.show_all();
-               } else {
-                       cleanup_post_view();
-                       _post_plugin_conn = retrn->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_post_view = return_ui;
-                       
-                       post_redir_hpane.add2 (*_active_post_view);
-                       post_redir_hpane.show_all();
-               }
+               cleanup_view();
+               _plugin_conn = retrn->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
+                                                              insert));
+               _active_view = return_ui;
+               
+               redir_hpane.add2 (*_active_view);
+               redir_hpane.show_all();
 
        } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {                         
 
                GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true);
 
-               if (place == PreFader) {
-                       cleanup_pre_view();
-                       _pre_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::plugin_going_away),
-                                       PreFader));
-                       plugin_ui->start_updating (0);
-                       _active_pre_view = plugin_ui;
-                       pre_redir_hpane.pack2 (*_active_pre_view);
-                       pre_redir_hpane.show_all();
-               } else {
-                       cleanup_post_view();
-                       _post_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::plugin_going_away),
-                                       PostFader));
-                       plugin_ui->start_updating (0);
-                       _active_post_view = plugin_ui;
-                       post_redir_hpane.pack2 (*_active_post_view);
-                       post_redir_hpane.show_all();
-               }
+               cleanup_view();
+               _plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away),
+                                                                                PreFader));
+               plugin_ui->start_updating (0);
+               _active_view = plugin_ui;
+               redir_hpane.pack2 (*_active_view);
+               redir_hpane.show_all();
 
        } else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
 
                PortInsertUI *portinsert_ui = new PortInsertUI (*session, port_insert);
                                
-               if (place == PreFader) {
-                       cleanup_pre_view();
-                       _pre_plugin_conn = port_insert->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_pre_view = portinsert_ui;
-                       pre_redir_hpane.pack2 (*_active_pre_view);
-                       portinsert_ui->redisplay();
-                       pre_redir_hpane.show_all();
-               } else {
-                       cleanup_post_view();
-                       _post_plugin_conn = port_insert->GoingAway.connect (bind (
-                                       mem_fun(*this, &RouteParams_UI::redirect_going_away),
-                                       insert));
-                       _active_post_view = portinsert_ui;
-                       post_redir_hpane.pack2 (*_active_post_view);
-                       portinsert_ui->redisplay();
-                       post_redir_hpane.show_all();
-               }
+               cleanup_view();
+               _plugin_conn = port_insert->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away),
+                                                                    insert));
+               _active_view = portinsert_ui;
+               redir_hpane.pack2 (*_active_view);
+               portinsert_ui->redisplay();
+               redir_hpane.show_all();
        }
                                
-       if (place == PreFader) {
-               _pre_processor = insert;
-       } else {
-               _post_processor = insert;
-       }
+       _processor = insert;
        
        update_title();
                
@@ -680,12 +581,8 @@ RouteParams_UI::plugin_going_away (Placement place)
        // delete the current view without calling finish
 
        if (place == PreFader) {
-               cleanup_pre_view (false);
-               _pre_processor.reset ((Processor*) 0);
-       }
-       else {
-               cleanup_post_view (false);
-               _post_processor.reset ((Processor*) 0);
+               cleanup_view (false);
+               _processor.reset ((Processor*) 0);
        }
 }
 
@@ -697,16 +594,12 @@ RouteParams_UI::redirect_going_away (boost::shared_ptr<ARDOUR::Processor> insert
        
        printf ("redirect going away\n");
        // delete the current view without calling finish
-       if (insert == _pre_processor) {
-               cleanup_pre_view (false);
-               _pre_processor.reset ((Processor*) 0);
-       } else if (insert == _post_processor) {
-               cleanup_post_view (false);
-               _post_processor.reset ((Processor*) 0);
-       }
+       if (insert == _processor) {
+               cleanup_view (false);
+               _processor.reset ((Processor*) 0);
+       } 
 }
 
-
 void
 RouteParams_UI::update_title ()
 {
@@ -759,11 +652,7 @@ RouteParams_UI::update_views ()
        SendUI *sui;
        // TODO: only do it if correct tab is showing
        
-       if ((sui = dynamic_cast<SendUI*> (_active_pre_view)) != 0) {
-               sui->update ();
-       }
-       if ((sui = dynamic_cast<SendUI*> (_active_post_view)) != 0) {
+       if ((sui = dynamic_cast<SendUI*> (_active_view)) != 0) {
                sui->update ();
        }
-
 }
index 0f9fe6423f14b51dd8aabf57dd807f02e46fd9bf..5fd7487bc1873d0a0b82d9117f91449eb782fd3b 100644 (file)
@@ -80,16 +80,14 @@ class RouteParams_UI : public ArdourDialog
        Gtk::Notebook            notebook;
        Gtk::Frame               input_frame;
        Gtk::Frame               output_frame;
-       Gtk::HPaned              pre_redir_hpane;
-       Gtk::HPaned              post_redir_hpane;
+       Gtk::HPaned              redir_hpane;
 
        Gtk::Frame               route_select_frame;
 
        Gtk::HBox                route_hpacker;
        Gtk::VBox                route_vpacker;
 
-       ProcessorBox              * pre_insert_box;
-       ProcessorBox              * post_insert_box;
+       ProcessorBox*            insert_box;
        
        Gtk::HPaned              list_hpane;
 
@@ -119,8 +117,7 @@ class RouteParams_UI : public ArdourDialog
        
        Gtk::Label  title_label;
        
-       Gtk::Container * _active_pre_view;
-       Gtk::Container * _active_post_view;
+       Gtk::Container * _active_view;
        IOSelector     * _input_iosel;
        IOSelector     * _output_iosel;
        
@@ -131,12 +128,9 @@ class RouteParams_UI : public ArdourDialog
        sigc::connection            _route_conn;
        sigc::connection            _route_ds_conn;
 
-       boost::shared_ptr<ARDOUR::Processor> _pre_processor;
-       sigc::connection                    _pre_plugin_conn;
+       boost::shared_ptr<ARDOUR::Processor> _processor;
+       sigc::connection                    _plugin_conn;
 
-       boost::shared_ptr<ARDOUR::Processor> _post_processor;
-       sigc::connection                     _post_plugin_conn;
-       
        
        enum ConfigView {
                NO_CONFIG_VIEW = 0,
@@ -176,8 +170,7 @@ class RouteParams_UI : public ArdourDialog
 
        void setup_io_frames();
        void cleanup_io_frames();
-       void cleanup_pre_view(bool stopupdate = true);
-       void cleanup_post_view(bool stopupdate = true);
+       void cleanup_view(bool stopupdate = true);
        void cleanup_latency_frame ();
        void setup_latency_frame ();
        
@@ -186,7 +179,7 @@ class RouteParams_UI : public ArdourDialog
        void setup_processor_boxes();
        void cleanup_processor_boxes();
 
-       void redirect_selected (boost::shared_ptr<ARDOUR::Processor>, ARDOUR::Placement);
+       void redirect_selected (boost::shared_ptr<ARDOUR::Processor>);
        
        void plugin_going_away (ARDOUR::Placement);
        void redirect_going_away (boost::shared_ptr<ARDOUR::Processor>);
index ebc4a350e69739de2707421c1b1e65b0c8593e33..87ba46ffb64b7938590161048f2cd57ca8ab3723 100644 (file)
@@ -2397,7 +2397,14 @@ RouteTimeAxisView::set_button_names ()
        rec_enable_button_label.set_text (_("r"));
 
        if (Config->get_solo_control_is_listen_control()) {
-               solo_button_label.set_text (_("l"));
+               switch (Config->get_listen_position()) {
+               case AfterFaderListen:
+                       solo_button_label.set_text (_("A"));
+                       break;
+               case PreFaderListen:
+                       solo_button_label.set_text (_("P"));
+                       break;
+               }
        } else {
                solo_button_label.set_text (_("s"));
        }
index 21a9b0280d8f1f9e699ea3557a446117e3dac99d..817c710fd80960c205acda856be1b1c47c850ae1 100644 (file)
@@ -1210,10 +1210,10 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
        options.set_spacing (12);
 
        str.clear ();
-       str.push_back (_("use file timestamp"));
-       str.push_back (_("at edit point"));
-       str.push_back (_("at playhead"));
-       str.push_back (_("at session start"));
+       str.push_back (_("file timestamp"));
+       str.push_back (_("edit point"));
+       str.push_back (_("playhead"));
+       str.push_back (_("session start"));
        set_popdown_strings (where_combo, str);
        where_combo.set_active_text (str.front());
 
@@ -1240,7 +1240,7 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi
        action_combo.set_sensitive (false);
 
        l = manage (new Label);
-       l->set_text (_("Insert:"));
+       l->set_text (_("Insert at:"));
 
        hbox = manage (new HBox);
        hbox->set_border_width (12);
@@ -1364,11 +1364,11 @@ SoundFileOmega::get_position() const
 {
        ustring str = where_combo.get_active_text();
 
-       if (str == _("use file timestamp")) {
+       if (str == _("file timestamp")) {
                return ImportAtTimestamp;
-       } else if (str == _("at edit point")) {
+       } else if (str == _("edit point")) {
                return ImportAtEditPoint;
-       } else if (str == _("at playhead")) {
+       } else if (str == _("playhead")) {
                return ImportAtPlayhead;
        } else {
                return ImportAtStart;
index bbfa173b41599b1188ad297d282260a4db2e1b73..5dc6c2b75f03cf559dcbb816246c0999f9c9a8d0 100644 (file)
@@ -191,7 +191,8 @@ Glib::ustring
 ArdourStartup::session_folder ()
 {
        if (ic_new_session_button.get_active()) {
-               return Glib::build_filename (new_folder_chooser.get_current_folder(), new_name_entry.get_text());
+               Glib::ustring legal_session_folder_name = legalize_for_path (new_name_entry.get_text());
+               return Glib::build_filename (new_folder_chooser.get_current_folder(), legal_session_folder_name);
        } else {
                TreeIter iter = recent_session_display.get_selection()->get_selected();
 
index be7c5a649ca33e4aceae405a3f58cb86b0bea119..299e3e0c53cefe017b9ed9e95a1be5cd0e43ea80 100644 (file)
@@ -42,8 +42,7 @@ def configure(conf):
        conf.env.append_value('CCFLAGS', '-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE')
        conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
 
-       conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
-       conf.write_config_header('wafconfig.h')
+       conf.write_config_header('gtk2ardour-config.h')
 
        # TODO
        conf.define('WINDOWS_KEY', 'Mod4')
@@ -244,7 +243,6 @@ def build(bld):
        if bld.env['HAVE_SLV2']:
                obj.source += ' lv2_plugin_ui.cc '
                obj.uselib += ' SLV2 '
-               obj.cxxflags += ['-DHAVE_SLV2']
 
        # Wrappers
 
index 664c22c58396325da8a1fc004d78c0444eeb3c1a..1350a3c5abc87a2c3207972cdef4aa0825bdc5d0 100644 (file)
 #ifndef __ardour_buffer_set_h__
 #define __ardour_buffer_set_h__
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <cassert>
 #include <vector>
 #include "ardour/chan_count.h"
index c057d45cc8d1cbead373713a29f38a3f1da18f8c..384f2900d87e134bba93719e354361a667fcd464 100644 (file)
@@ -34,7 +34,7 @@ class InternalReturn : public Return
        InternalReturn (Session&);
        InternalReturn (Session&, const XMLNode&);
 
-       bool visible() const { return true; }
+       bool visible() const;
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
index 3172176897903bf558a648897ab8239a007982ea..ea2ffce3fe32c561e6ac60b9e3bfd411228e97e7 100644 (file)
@@ -33,6 +33,7 @@ class InternalSend : public Send
        virtual ~InternalSend ();
 
        bool set_name (const std::string&);
+       bool visible() const;
 
        XMLNode& state(bool full);
        XMLNode& get_state(void);
index 5ee565fc1ee152e2578594b7b87f651dcc4c79ed..b008a62f18412ecab985d64bf123b94e69b932f8 100644 (file)
@@ -52,8 +52,8 @@ class Location : public PBD::StatefulDestructible
                IsStart = 0x80
        };
 
-       Location (nframes_t sample_start,
-                 nframes_t sample_end,
+       Location (nframes64_t sample_start,
+                 nframes64_t sample_end,
                  const std::string &name,
                  Flags bits = Flags(0))                
                
@@ -78,15 +78,15 @@ class Location : public PBD::StatefulDestructible
        void lock() { _locked = true; changed (this); }
        void unlock() { _locked = false; changed (this); }
        
-       nframes_t start() const  { return _start; }
-       nframes_t end() const { return _end; }
-       nframes_t length() const { return _end - _start; }
+       nframes64_t start() const  { return _start; }
+       nframes64_t end() const { return _end; }
+       nframes64_t length() const { return _end - _start; }
 
-       int set_start (nframes_t s);
-       int set_end (nframes_t e);
-       int set (nframes_t start, nframes_t end);
+       int set_start (nframes64_t s);
+       int set_end (nframes64_t e);
+       int set (nframes64_t start, nframes64_t end);
 
-       int move_to (nframes_t pos);
+       int move_to (nframes64_t pos);
 
        const std::string& name() const { return _name; }
        void set_name (const std::string &str) { _name = str; name_changed(this); }
@@ -129,8 +129,8 @@ class Location : public PBD::StatefulDestructible
 
   private:
        std::string   _name;
-       nframes_t     _start;
-       nframes_t     _end;
+       nframes64_t   _start;
+       nframes64_t   _end;
        Flags         _flags;
        bool          _locked;
 
@@ -169,11 +169,11 @@ class Locations : public PBD::StatefulDestructible
        int set_current (Location *, bool want_lock = true);
        Location *current () const { return current_location; }
 
-       Location *first_location_before (nframes_t, bool include_special_ranges = false);
-       Location *first_location_after (nframes_t, bool include_special_ranges = false);
+       Location *first_location_before (nframes64_t, bool include_special_ranges = false);
+       Location *first_location_after (nframes64_t, bool include_special_ranges = false);
 
-       nframes_t first_mark_before (nframes_t, bool include_special_ranges = false);
-       nframes_t first_mark_after (nframes_t, bool include_special_ranges = false);
+       nframes64_t first_mark_before (nframes64_t, bool include_special_ranges = false);
+       nframes64_t first_mark_after (nframes64_t, bool include_special_ranges = false);
 
        void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags);
 
index 7c17378df260a3227e8a736ac0427bd3e4e36b90..90f00be8b1fb1387daa5fe563921c6621bb27a2d 100644 (file)
 #ifndef __ardour_plugin_manager_h__
 #define __ardour_plugin_manager_h__
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <list>
 #include <map>
 #include <string>
index f91e9a686323c2708ccef7936ae007c6d2bb482d..248f485c4f9c99afb413093ebf31e69dbbeabc38 100644 (file)
@@ -55,19 +55,10 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
        virtual ~Processor() { }
        
        virtual bool visible() const { return true; }
-       
-       bool active () const { return _active; }
+       virtual void set_visible (bool) {}
 
-       /* we keep loose tabs on the "placement" of a Processor. Ultimately,
-          they are all executed as a single list, but there are some
-          semantics that require knowing whether a Processor is before
-          or after the fader, or panner etc. See Route::reorder_processors()
-          to see where this gets set.
-       */
+       bool active () const { return _active; }
 
-       Placement placement() const { return _placement; }
-       void set_placement (Placement p) { _placement = p; }
-       
        bool get_next_ab_is_active () const { return _next_ab_is_active; }
        void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; }
        
@@ -116,7 +107,6 @@ protected:
        ChanCount _configured_input;
        ChanCount _configured_output;
        void*     _gui;  /* generic, we don't know or care what this is */
-       Placement _placement;
 };
 
 } // namespace ARDOUR
index 5e04837d9134a5b1dda80088c60c627b7ea2dd19..f7b51c20375c779e9b8d78beac22a8f6e5b7b8b0 100644 (file)
@@ -187,6 +187,8 @@ class Route : public SessionObject, public AutomatableControls
                }
        }
 
+       bool processor_is_prefader (boost::shared_ptr<Processor> p);
+
        ChanCount max_processor_streams () const { return processor_max_streams; }
 
        /* special processors */
@@ -215,7 +217,7 @@ class Route : public SessionObject, public AutomatableControls
        int add_processors (const ProcessorList&, Placement placement, ProcessorStreams* err = 0);
        int add_processors (const ProcessorList&, ProcessorList::iterator iter, ProcessorStreams* err = 0);
        int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
-       int reorder_processors (const ProcessorList& new_order, Placement placement, ProcessorStreams* err = 0);
+       int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);
        void disable_processors (Placement);
        void disable_processors ();
        void disable_plugins (Placement);
index 19599eb3486af872e8c8d58127bd619196ddc866..2ccc61bb9c4f14fd525011e9c626055106f458e5 100644 (file)
 #ifndef __ardour_utils_h__
 #define __ardour_utils_h__
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <iostream>
 #include <string>
 #include <cmath>
index 0d069c0c23ecc53905ea9ba303141a5a67c55459..9b313a3659634df41a261b15ae7b87a7e18febd0 100644 (file)
@@ -798,6 +798,9 @@ AUPlugin::can_do (int32_t in, int32_t& out)
                        }
                }
 
+               if (plugcnt == 1) {
+                       break;
+               }
        }
 
        /* no fit */
@@ -1650,8 +1653,10 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                if (cached_io_configuration (info->unique_id, info->version, cacomp, info->cache, info->name)) {
 
                        /* here we have to map apple's wildcard system to a simple pair
-                          of values.
-                       */
+                          of values. in ::can_do() we use the whole system, but here
+                          we need a single pair of values. XXX probably means we should
+                          remove any use of these values.
+                       */
 
                        info->n_inputs = info->cache.io_configs.front().first;
                        info->n_outputs = info->cache.io_configs.front().second;
@@ -1824,7 +1829,8 @@ AUPluginInfo::load_cached_info ()
                        }
 
                        std::string id = prop->value();
-                       
+                       AUPluginCachedInfo cinfo;
+
                        for (XMLNodeConstIterator giter = gchildren.begin(); giter != gchildren.end(); giter++) {
 
                                gchild = *giter;
@@ -1841,12 +1847,14 @@ AUPluginInfo::load_cached_info ()
                                                in = atoi (iprop->value());
                                                out = atoi (iprop->value());
                                                
-                                               AUPluginCachedInfo cinfo;
                                                cinfo.io_configs.push_back (pair<int,int> (in, out));
-                                               add_cached_info (id, cinfo);
                                        }
                                }
                        }
+
+                       if (cinfo.io_configs.size()) {
+                               add_cached_info (id, cinfo);
+                       }
                }
        }
 
index 4143cb109a870541cade7407b1179ad3dacfc37f..7533a1ed8f71ce9ad9f500363655b76d772b626c 100644 (file)
@@ -1161,8 +1161,6 @@ AudioEngine::remove_connections_for (Port& port)
 }
 
 
-#ifdef HAVE_JACK_CLIENT_OPEN
-
 static void 
 ardour_jack_error (const char* msg) 
 {
@@ -1193,22 +1191,6 @@ AudioEngine::connect_to_jack (string client_name)
        return 0;
 }
 
-#else
-
-int
-AudioEngine::connect_to_jack (string client_name)
-{
-       jack_client_name = client_name;
-
-       if ((_jack = jack_client_new (client_name.c_str())) == 0) {
-               return -1;
-       }
-
-       return 0;
-}
-
-#endif /* HAVE_JACK_CLIENT_OPEN */
-
 int 
 AudioEngine::disconnect_from_jack ()
 {
index 3f5665ee9957a8c48f17753beabd390279f092fd..f1a65edc63645d9ff41d4e5eef3b2ea4b398512e 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <vector>
 
 #include <sys/time.h>
@@ -345,8 +349,12 @@ AudioFileSource::safe_audio_file_extension(const ustring& file)
                ".vwe", ".VWE",
                ".paf", ".PAF",
                ".voc", ".VOC",
+#ifdef HAVE_OGG
+               ".ogg", ".OGG",
+#endif /* HAVE_OGG */
 #ifdef HAVE_FLAC
                ".flac", ".FLAC",
+#else
 #endif // HAVE_FLAC
 #ifdef HAVE_COREAUDIO
                ".mp3", ".MP3",
index 589c13ce411fca9edbed928fdb2b4e1823f042c5..e02e2ba2cbb5b7267400d93f635edc7ee8ea0a40 100644 (file)
     675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <iostream>
 #include <algorithm>
 #include "ardour/buffer.h"
index 04875617247293473914024f0ea121cb29c8039f..f8bba4c8e71bf58ca054971d2779c3eb2b332d63 100644 (file)
@@ -181,10 +181,14 @@ Delivery::configure_io (ChanCount in, ChanCount out)
        if (out != in) { // always 1:1
                return false;
        }
+       
+       if (!Processor::configure_io (in, out)) {
+               return false;
+       }
 
        reset_panner ();
-       
-       return Processor::configure_io (in, out);
+
+       return true;
 }
 
 void
@@ -431,11 +435,8 @@ Delivery::target_gain ()
                        break;
                case Send:
                case Insert:
-                       if (_placement == PreFader) {
-                               mp = MuteMaster::PreFader;
-                       } else {
-                               mp = MuteMaster::PostFader;
-                       }
+                       /* XXX FIX ME this is wrong, we need per-delivery muting */
+                       mp = MuteMaster::PreFader;
                        break;
                }
 
index 26e2baca266c1775a96b71fee850d806c983aafc..90f05ce325f49e47a32c3c616274c0fcbd32c71d 100644 (file)
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <cstdio> // Needed so that libraptor (included in lrdf) won't complain
 #include <sys/stat.h>
 #include <sys/types.h>
index 85631b25bde49c1c0b2037293d0b3d58f364d8c4..12a7db3659afc9eea456eb61da2ee18772c7c292 100644 (file)
 
 */
 
+
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <cstdio>
 #include <cstdlib>
 #include <string>
index f3ab1dd901a4bf63091e62c6cee38834ee993f22..37a559649caae842efeb07d22900eb23bb23faf4 100644 (file)
@@ -138,5 +138,8 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
        return true;
 }
 
-
-
+bool
+InternalReturn::visible () const
+{
+       return false; 
+}
index 177df4222c8f0a08398ba159af7bb74b7ac62628..718e34f29eb972fc1b1c97173680468fa58ced34 100644 (file)
@@ -222,3 +222,9 @@ InternalSend::set_name (const std::string& str)
        /* rules for external sends don't apply to us */
        return IOProcessor::set_name (str);
 }
+
+bool
+InternalSend::visible () const
+{
+       return false; 
+}
index dd32da26284a0a200ef236d10460409f4af67355..f6678966e4840598957ffec1f83cfa48a03c1968 100644 (file)
@@ -88,7 +88,7 @@ Location::operator= (const Location& other)
 }
 
 int
-Location::set_start (nframes_t s)
+Location::set_start (nframes64_t s)
 {
        if (_locked) {
                return -1;
@@ -129,7 +129,7 @@ Location::set_start (nframes_t s)
 }
 
 int
-Location::set_end (nframes_t e)
+Location::set_end (nframes64_t e)
 {
        if (_locked) {
                return -1;
@@ -166,7 +166,7 @@ Location::set_end (nframes_t e)
 }
 
 int
-Location::set (nframes_t start, nframes_t end)
+Location::set (nframes64_t start, nframes64_t end)
 {
        if (_locked) {
                return -1;
@@ -191,7 +191,7 @@ Location::set (nframes_t start, nframes_t end)
 }
 
 int
-Location::move_to (nframes_t pos) 
+Location::move_to (nframes64_t pos) 
 {
        if (_locked) {
                return -1;
@@ -385,14 +385,14 @@ Location::set_state (const XMLNode& node)
                   may make the value of _start illegal.
                */
                
-       _start = atoi (prop->value().c_str());
-               
+       sscanf (prop->value().c_str(), "%" PRIu32, &_start);
+       
        if ((prop = node.property ("end")) == 0) {
                  error << _("XML node for Location has no end information") << endmsg; 
                  return -1;
        }
                
-       _end = atoi (prop->value().c_str());
+       sscanf (prop->value().c_str(), "%" PRIu32, &_end);
                
        if ((prop = node.property ("flags")) == 0) {
                  error << _("XML node for Location has no flags information") << endmsg; 
@@ -733,7 +733,7 @@ struct LocationStartLaterComparison
 };
 
 Location *
-Locations::first_location_before (nframes_t frame, bool include_special_ranges)
+Locations::first_location_before (nframes64_t frame, bool include_special_ranges)
 {
        LocationList locs;
 
@@ -760,7 +760,7 @@ Locations::first_location_before (nframes_t frame, bool include_special_ranges)
 }
 
 Location *
-Locations::first_location_after (nframes_t frame, bool include_special_ranges)
+Locations::first_location_after (nframes64_t frame, bool include_special_ranges)
 {
        LocationList locs;
 
@@ -786,8 +786,8 @@ Locations::first_location_after (nframes_t frame, bool include_special_ranges)
        return 0;
 }
 
-nframes_t
-Locations::first_mark_before (nframes_t frame, bool include_special_ranges)
+nframes64_t
+Locations::first_mark_before (nframes64_t frame, bool include_special_ranges)
 {
        LocationList locs;
 
@@ -826,8 +826,8 @@ Locations::first_mark_before (nframes_t frame, bool include_special_ranges)
        return 0;
 }
 
-nframes_t
-Locations::first_mark_after (nframes_t frame, bool include_special_ranges)
+nframes64_t
+Locations::first_mark_after (nframes64_t frame, bool include_special_ranges)
 {
        LocationList locs;
 
index 72e34aec01b60431a620cd9dc885a2656dc8054d..e94487845eeb4b321e4807aa08720bc256f718dc 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <vector>
 #include <string>
 
index bf8f0071048cf05d3d4033116a4b15aba004e1a2..461a3f0685986a819ac5dbd0ce2ba8c4c23bbcc5 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <string>
 
 #include <sigc++/bind.h>
index c0c854180f85dc3ecf6b4aa904794bb1847775df..87282037942d2db7ea253c5b13f4beae0f2a1efa 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #define __STDC_FORMAT_MACROS 1
 #include <stdint.h>
 
index 19955d2530775a024a323045da78d971467bfe7a..4b4f0a939ad5d55da3c66cfa7014b76800bd4ea4 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include "ardour/port.h"
 #include "ardour/audioengine.h"
 #include "pbd/failed_constructor.h"
index ece9d6becc50b13c92b192d2f37350bddfc97ce8..e3a2b0b15ef5caf361e821d6f5326be75d5b4546 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <string>
 
 #include <sigc++/bind.h>
@@ -142,7 +146,6 @@ Processor::set_state (const XMLNode& node)
 {
        const XMLProperty *prop;
        const XMLProperty *legacy_active = 0;
-       const XMLProperty *legacy_placement = 0;
 
        // may not exist for legacy 3.0 sessions
        if ((prop = node.property ("name")) != 0) {
@@ -192,9 +195,6 @@ Processor::set_state (const XMLNode& node)
                        if ( !(legacy_active = (*niter)->property("active"))) {
                                error << string_compose(_("No %1 property flag in element %2"), "active", (*niter)->name()) << endl;
                        }
-                       if ( !(legacy_placement = (*niter)->property("placement"))) {
-                               error << string_compose(_("No %1 property flag in element %2"), "placement", (*niter)->name()) << endl;
-                       }
                }
        }
 
index 61f975689c7187019ea061ec6228e8fbbda80220..84b46f020ca3d288d44814a27a9ac8ea82907844 100644 (file)
@@ -1348,8 +1348,33 @@ Route::all_processors_active (Placement p, bool state)
        _session.set_dirty ();
 }
 
+bool
+Route::processor_is_prefader (boost::shared_ptr<Processor> p)
+{
+       bool pre_fader = true;
+       Glib::RWLock::ReaderLock lm (_processor_lock);
+
+       for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+
+               /* semantic note: if p == amp, we want to return true, so test
+                  for equality before checking if this is the amp
+               */
+
+               if ((*i) == p) {
+                       break;
+               }
+
+               if ((*i) == _amp) {
+                       pre_fader = false;
+                       break;
+               }
+       }
+
+       return pre_fader;
+}
+
 int
-Route::reorder_processors (const ProcessorList& new_order, Placement placement, ProcessorStreams* err)
+Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err)
 {
        /* "new_order" is an ordered list of processors to be positioned according to "placement".
           NOTE: all processors in "new_order" MUST be marked as visible. There maybe additional
@@ -1364,11 +1389,8 @@ Route::reorder_processors (const ProcessorList& new_order, Placement placement,
                ProcessorList::const_iterator niter;
                ProcessorList as_it_was_before = _processors;
                ProcessorList as_it_will_be;
-               ProcessorList::iterator start, end;
-
-               placement_range (placement, start, end);
 
-               oiter = start;
+               oiter = _processors.begin();
                niter = new_order.begin(); 
 
                while (niter !=  new_order.end()) {
@@ -1380,7 +1402,7 @@ Route::reorder_processors (const ProcessorList& new_order, Placement placement,
                           its been deleted. If its there, append it to the temp list.
                        */
 
-                       if (oiter == end) {
+                       if (oiter == _processors.end()) {
 
                                /* no more elements in the old list, so just stick the rest of 
                                   the new order onto the temp list.
@@ -1388,7 +1410,6 @@ Route::reorder_processors (const ProcessorList& new_order, Placement placement,
 
                                as_it_will_be.insert (as_it_will_be.end(), niter, new_order.end());
                                while (niter != new_order.end()) {
-                                       (*niter)->set_placement (placement);
                                        ++niter;
                                }
                                break;
@@ -1398,7 +1419,6 @@ Route::reorder_processors (const ProcessorList& new_order, Placement placement,
                                if (!(*oiter)->visible()) {
 
                                        as_it_will_be.push_back (*oiter);
-                                       (*oiter)->set_placement (placement);
 
                                } else {
 
@@ -1409,7 +1429,6 @@ Route::reorder_processors (const ProcessorList& new_order, Placement placement,
                                        } else {
                                                /* ignore this one, and add the next item from the new order instead */
                                                as_it_will_be.push_back (*niter);
-                                               (*niter)->set_placement (placement);
                                                ++niter;
                                        }
                                }
index 58e68cb353060d9cd55af2f27dd7c7a8de48f15d..7abbcb49d176c7fc35ab391792b63721bdf2941b 100644 (file)
@@ -2019,6 +2019,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
        RouteList ret;
        uint32_t control_id;
        XMLTree tree;
+       uint32_t number = 1;
 
        if (!tree.read (template_path.c_str())) {
                return ret;
@@ -2034,30 +2035,25 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
          
                std::string node_name = IO::name_from_state (*node_copy.children().front());
 
-               if (route_by_name (node_name) != 0) {
-
-                       /* generate a new name by adding a number to the end of the template name */
-
-                       uint32_t number = 1;
-
-                       do {
-                               snprintf (name, sizeof (name), "%s %" PRIu32, node_name.c_str(), number);
-             
-                               number++;
-             
-                               if (route_by_name (name) == 0) {
-                                       break;
-                               }
-             
-                       } while (number < UINT_MAX);
-
-                       if (number == UINT_MAX) {
-                               fatal << _("Session: UINT_MAX routes? impossible!") << endmsg;
-                               /*NOTREACHED*/
+               /* generate a new name by adding a number to the end of the template name */
+               
+               do {
+                       snprintf (name, sizeof (name), "%s %" PRIu32, node_name.c_str(), number);
+                       
+                       number++;
+                       
+                       if (route_by_name (name) == 0) {
+                               break;
                        }
-
-                       IO::set_name_in_state (*node_copy.children().front(), name);
+                       
+               } while (number < UINT_MAX);
+               
+               if (number == UINT_MAX) {
+                       fatal << _("Session: UINT_MAX routes? impossible!") << endmsg;
+                       /*NOTREACHED*/
                }
+               
+               IO::set_name_in_state (*node_copy.children().front(), name);
 
                Track::zero_diskstream_id_in_xml (node_copy);
 
@@ -2201,6 +2197,7 @@ Session::add_internal_sends (boost::shared_ptr<Route> dest, boost::shared_ptr<Ro
                        continue;
                }
 
+               cerr << (*i)->name() << " listening via " << dest->name() << endl;
                (*i)->listen_via (dest, true);
        }
 }
index c05dda60cd47f238c8869f1bb82d4ec09450210d..0946acfadedf33d2d30c85e483230c161812d6c7 100644 (file)
     
 */
 
+
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #define __STDC_FORMAT_MACROS 1
 #include <stdint.h>
 
@@ -588,7 +593,7 @@ Session::remove_pending_capture_state ()
 {
        sys::path pending_state_file_path(_session_dir->root_path());
        
-       pending_state_file_path /= _current_snapshot_name + pending_suffix;
+       pending_state_file_path /= legalize_for_path (_current_snapshot_name) + pending_suffix;
 
        try
        {
@@ -612,8 +617,8 @@ Session::rename_state (string old_name, string new_name)
                return;
        }
 
-       const string old_xml_filename = old_name + statefile_suffix;
-       const string new_xml_filename = new_name + statefile_suffix;
+       const string old_xml_filename = legalize_for_path (old_name) + statefile_suffix;
+       const string new_xml_filename = legalize_for_path (new_name) + statefile_suffix;
 
        const sys::path old_xml_path = _session_dir->root_path() / old_xml_filename;
        const sys::path new_xml_path = _session_dir->root_path() / new_xml_filename;
@@ -642,7 +647,7 @@ Session::remove_state (string snapshot_name)
 
        sys::path xml_path(_session_dir->root_path());
 
-       xml_path /= snapshot_name + statefile_suffix;
+       xml_path /= legalize_for_path (snapshot_name) + statefile_suffix;
 
        if (!create_backup_file (xml_path)) {
                // don't remove it if a backup can't be made
@@ -685,7 +690,7 @@ Session::save_state (string snapshot_name, bool pending)
 
                /* proper save: use statefile_suffix (.ardour in English) */
                
-               xml_path /= snapshot_name + statefile_suffix;
+               xml_path /= legalize_for_path (snapshot_name) + statefile_suffix;
 
                /* make a backup copy of the old file */
 
@@ -697,12 +702,12 @@ Session::save_state (string snapshot_name, bool pending)
        } else {
 
                /* pending save: use pending_suffix (.pending in English) */
-               xml_path /= snapshot_name + pending_suffix;
+               xml_path /= legalize_for_path (snapshot_name) + pending_suffix;
        }
 
        sys::path tmp_path(_session_dir->root_path());
 
-       tmp_path /= snapshot_name + temp_suffix;
+       tmp_path /= legalize_for_path (snapshot_name) + temp_suffix;
 
        // cerr << "actually writing state to " << xml_path.to_string() << endl;
 
@@ -760,7 +765,7 @@ Session::load_state (string snapshot_name)
        /* check for leftover pending state from a crashed capture attempt */
 
        sys::path xmlpath(_session_dir->root_path());
-       xmlpath /= snapshot_name + pending_suffix;
+       xmlpath /= legalize_for_path (snapshot_name) + pending_suffix;
 
        if (sys::exists (xmlpath)) {
 
@@ -773,7 +778,7 @@ Session::load_state (string snapshot_name)
 
        if (!state_was_pending) {
                xmlpath = _session_dir->root_path();
-               xmlpath /= snapshot_name + statefile_suffix;
+               xmlpath /= legalize_for_path (snapshot_name) + statefile_suffix;
        }
        
        if (!sys::exists (xmlpath)) {
@@ -819,7 +824,7 @@ Session::load_state (string snapshot_name)
 
                sys::path backup_path(_session_dir->root_path());
 
-               backup_path /= snapshot_name + "-1" + statefile_suffix;
+               backup_path /= legalize_for_path (snapshot_name) + "-1" + statefile_suffix;
 
                // only create a backup once
                if (sys::exists (backup_path)) {
@@ -2348,7 +2353,7 @@ Session::find_all_sources_across_snapshots (set<string>& result, bool exclude_th
        }
 
        this_snapshot_path = _path;
-       this_snapshot_path += _current_snapshot_name;
+       this_snapshot_path += legalize_for_path (_current_snapshot_name);
        this_snapshot_path += statefile_suffix;
 
        for (vector<string*>::iterator i = state_files->begin(); i != state_files->end(); ++i) {
@@ -2809,7 +2814,7 @@ Session::save_history (string snapshot_name)
                snapshot_name = _current_snapshot_name;
        }
   
-       const string history_filename = snapshot_name + history_suffix;
+       const string history_filename = legalize_for_path (snapshot_name) + history_suffix;
        const string backup_filename = history_filename + backup_suffix;
        const sys::path xml_path = _session_dir->root_path() / history_filename;
        const sys::path backup_path = _session_dir->root_path() / backup_filename;
@@ -2862,11 +2867,11 @@ Session::restore_history (string snapshot_name)
        if (snapshot_name.empty()) {
                snapshot_name = _current_snapshot_name;
        }
-
-       const string xml_filename = snapshot_name + history_suffix;
+       
+       const string xml_filename = legalize_for_path (snapshot_name) + history_suffix;
        const sys::path xml_path = _session_dir->root_path() / xml_filename;
-
-    cerr << "Loading history from " << xml_path.to_string() << endmsg;
+       
+       cerr << "Loading history from " << xml_path.to_string() << endmsg;
 
        if (!sys::exists (xml_path)) {
                info << string_compose (_("%1: no history file \"%2\" for this session."),
index 32a94adee106c4d3e5da729953e453a382a4a25d..3126287c6bee0018eb95b628674e3643382c32c9 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <iostream>
 #include <cmath>
 #include <unistd.h>
index 234f55f30b0a0029d4b9a272eca7fa3166c1713b..df35dbe387ed8fea18bed39cb7bb9ec61a10ef51 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include <cstring>
 #include <cerrno>
 #include <climits>
index 544b04e1c742afc60d4134e37f41629117c9adee..2438d5f6f941357b5ef24edd2ab64be8c971cd2f 100644 (file)
     $Id$
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #include "pbd/error.h"
 #include "pbd/convert.h"
 #include "pbd/pthread_utils.h"
index 9565b4450f6baca8dc4ebab1fe86ff927a711094..e12ae2cd893fffb798daff6a45859291bd624007 100644 (file)
 
 */
 
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
 #define __STDC_FORMAT_MACROS 1
 #include <stdint.h>
 
index 172047bde397f40e913e831574e25007599c92b2..6993412ce5a108c3ba6480cb2ddc6f3e7fae5972 100644 (file)
@@ -49,6 +49,10 @@ def configure(conf):
        autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
        autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH', mandatory=False)
        autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
+       autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
+       autowaf.check_pkg(conf, 'flac', uselib_store='FLAC', atleast_version='1.2.1')
+
+       # we don't try to detect this, since its part of our source tree
 
        conf.env.append_value('CXXFLAGS', '-DUSE_RUBBERBAND')
        conf.define('HAVE_RUBBERBAND', 1)
@@ -59,8 +63,7 @@ def configure(conf):
        conf.env.append_value('CCFLAGS', '-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE')
        conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
 
-       conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
-       conf.write_config_header('wafconfig.h')
+       conf.write_config_header('libardour-config.h')
 
        # Boost headers
        autowaf.check_header(conf, 'boost/shared_ptr.hpp')
@@ -244,7 +247,6 @@ def build(bld):
        if bld.env['HAVE_SLV2']:
                obj.source += ' lv2_plugin.cc lv2_event_buffer.cc uri_map.cc '
                obj.uselib += ' SLV2 '
-               obj.cxxflags += ['-DHAVE_SLV2']
                
        if bld.env['HAVE_CPPUNIT']:
                # Unit tests
index 2be7610e0f814bbd317511f37841f6be091177b6..b3dd3ef79f29c0b3167f1b7619e69a7699b2d5d6 100644 (file)
@@ -36,9 +36,6 @@ def configure(conf):
        autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
        autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
 
-       conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
-       conf.write_config_header('wafconfig.h')
-
        # TODO
        conf.env['SYSMIDI'] = 'JACK MIDI'
        conf.env.append_value('CXXFLAGS', '-DWITH_JACK_MIDI')
index cdc4ccea8d833a1c5a2123862ffd20b24a2fa199..3cc94638a335023019d829dad5b1523d61573acb 100644 (file)
@@ -28,8 +28,8 @@
 
 using std::string;
 
-#ifdef HAVE_WAFCONFIG_H
-#include "wafconfig.h"
+#ifdef WAF_BUILD
+#include "libpbd-config.h"
 #endif
 
 #ifdef HAVE_GETMNTENT
index 18f7b993e170ac55963533ec55896391e4b3d7f5..00cb253c700c48a7d9e9821582459e9235120893 100644 (file)
@@ -29,8 +29,8 @@ namespace PBD {
        void stacktrace (std::ostream& out, int levels = 0);
        void trace_twb();
 
-#ifdef HAVE_WAFCONFIG_H
-#include "wafconfig.h"
+#ifdef HAVE_WAFBUILD
+#include "libpbd-config.h"
 #endif
 
 #ifdef HAVE_EXECINFO
index f19fbfdc827d3d2e31a27f2a774e1d8c45cce7bc..ed9ef14c5c6fda21cfd6adf09c48c2cca746b637 100644 (file)
@@ -41,8 +41,7 @@ def configure(conf):
        # This must be defined for libpbd only, it breaks ardour
        conf.check(header_name='execinfo.h', define_name='PBD_HAVE_EXECINFO')
 
-       conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
-       conf.write_config_header('wafconfig.h')
+       conf.write_config_header('libpbd-config.h')
 
        # Boost headers
        autowaf.check_header(conf, 'boost/shared_ptr.hpp')
index 9cf5dbda8e983c513beab452fd6a9742234e16f9..658e2d7249a95429022d46908e6485cefd17cfbf 100644 (file)
@@ -26,21 +26,6 @@ def set_options(opt):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
-       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
-       autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
-
-       conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
-
-       # This must be defined for librubberband only, it breaks ardour
-       conf.check(header_name='execinfo.h', define_name='PBD_HAVE_EXECINFO')
-
-       conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
-       conf.write_config_header('wafconfig.h')
-
-       # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Library
index 1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8..28055d2ae6f2a2c584afcd769d7881e11f62ecd9 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2006-05-10.23
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -89,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -106,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
 case $1 in
-  lex|yacc)
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -138,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -148,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -157,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -187,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -210,7 +218,7 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
@@ -240,7 +248,7 @@ WARNING: \`$1' $msg.  You should only need it if
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
@@ -263,7 +271,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
@@ -277,11 +285,11 @@ WARNING: \`$1' is $msg.  You should only need it if
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -310,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -363,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/wscript b/wscript
index 051d97d07c77e8d6816ca91926026b55568e1847..3ef5f0df2c4a0e2d69d0dcdfbedee8a6401fd3c9 100644 (file)
--- a/wscript
+++ b/wscript
@@ -129,6 +129,11 @@ def configure(conf):
 
        # Fix utterly braindead FLAC include path to not smash assert.h
        conf.env['CPPPATH_FLAC'] = []
+       
+       # Tell everyone that this is a waf build
+
+       conf.env.append_value('CCFLAGS', '-DWAF_BUILD')
+       conf.env.append_value('CXXFLAGS', '-DWAF_BUILD')
 
        autowaf.print_summary(conf)
        opts = Options.options