merge pre- and post-fader processor boxes; start removing Placement (not finished) ; add -DWAF_BUILD and use per-directory foobar-config.h to correctly pick up configure-time settings like HAVE_OGG ; check for libgiomm (part of upgrade to newer gtk stack); 32 bit marker reload fix from 2.X; audiounit IO config cache fix from 2.X; multi-add route template fix from 2.X; plugin GUI delete fix from 2.X; solo button labels are A or P for listen mode

git-svn-id: svn://localhost/ardour2/branches/3.0@5344 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-07-13 00:26:28 +00:00
parent 402cc384ce
commit 88beef2e93
59 changed files with 452 additions and 462 deletions

View 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')

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "gtk2ardour-config.h"
#endif
#include "pbd/convert.h"
#include "pbd/stacktrace.h"

View File

@ -70,7 +70,6 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
/* Cocoa */
NSWindow* cocoa_window;
NSScrollView* scroll_view;
NSView* au_view;
/* Carbon */

View 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;

View 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

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "gtk2ardour-config.h"
#endif
#include <climits>
#include <cerrno>
#include <cmath>

View File

@ -21,6 +21,10 @@
#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>

View 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);

View 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;

View File

@ -1,3 +1,7 @@
#ifdef WAF_BUILD
#include "gtk2ardour-config.h"
#endif
#include <fstream>
#include <gtkmm/stock.h>

View 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>

View File

@ -17,6 +17,10 @@
*/
#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 ()
{

View File

@ -20,6 +20,10 @@
#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

View File

@ -17,6 +17,10 @@
*/
#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 */

View 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>);

View 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);
insert_box = new ProcessorBox(*session, *_plugin_selector, _rr_selection, 0);
insert_box->set_route (_route);
pre_redir_hpane.pack1 (*pre_insert_box);
post_redir_hpane.pack1 (*post_insert_box);
redir_hpane.pack1 (*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));
insert_box->ProcessorSelected.connect (mem_fun(*this, &RouteParams_UI::redirect_selected));
insert_box->ProcessorUnselected.connect (mem_fun(*this, &RouteParams_UI::redirect_selected));
pre_redir_hpane.show_all();
post_redir_hpane.show_all();
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) {
if ((sui = dynamic_cast<SendUI*> (_active_view)) != 0) {
sui->update ();
}
if ((sui = dynamic_cast<SendUI*> (_active_post_view)) != 0) {
sui->update ();
}
}

View 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>);

View 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"));
}

View 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;

View 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();

View 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

View File

@ -19,6 +19,10 @@
#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"

View 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);

View 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);

View 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);

View File

@ -20,6 +20,10 @@
#ifndef __ardour_plugin_manager_h__
#define __ardour_plugin_manager_h__
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <list>
#include <map>
#include <string>

View File

@ -55,19 +55,10 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
virtual ~Processor() { }
virtual bool visible() const { return true; }
virtual void set_visible (bool) {}
bool active () const { return _active; }
/* 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.
*/
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

View 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);

View File

@ -20,6 +20,10 @@
#ifndef __ardour_utils_h__
#define __ardour_utils_h__
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <iostream>
#include <string>
#include <cmath>

View 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);
}
}
}

View 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 ()
{

View File

@ -17,6 +17,10 @@
*/
#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",

View File

@ -16,6 +16,11 @@
675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <iostream>
#include <algorithm>
#include "ardour/buffer.h"

View 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;
}

View File

@ -16,6 +16,11 @@
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>

View File

@ -17,6 +17,11 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <cstdio>
#include <cstdlib>
#include <string>

View File

@ -138,5 +138,8 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
return true;
}
bool
InternalReturn::visible () const
{
return false;
}

View 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;
}

View 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;

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <vector>
#include <string>

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <string>
#include <sigc++/bind.h>

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#define __STDC_FORMAT_MACROS 1
#include <stdint.h>

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include "ardour/port.h"
#include "ardour/audioengine.h"
#include "pbd/failed_constructor.h"

View File

@ -17,6 +17,10 @@
*/
#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;
}
}
}

View 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;
}
}

View 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);
}
}

View File

@ -17,6 +17,11 @@
*/
#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."),

View File

@ -18,6 +18,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <iostream>
#include <cmath>
#include <unistd.h>

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <cstring>
#include <cerrno>
#include <climits>

View File

@ -18,6 +18,10 @@
$Id$
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include "pbd/error.h"
#include "pbd/convert.h"
#include "pbd/pthread_utils.h"

View File

@ -17,6 +17,10 @@
*/
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#define __STDC_FORMAT_MACROS 1
#include <stdint.h>

View 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

View 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')

View 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

View 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

View 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')

View 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

View File

@ -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:

View File

@ -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