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:
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ()
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
@@ -138,5 +138,8 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
InternalReturn::visible () const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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."),
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "libardour-config.h"
|
||||
#endif
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user