summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-13 00:26:28 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-13 00:26:28 +0000
commit88beef2e93d26d28467fe151f5ef2972d0ca9169 (patch)
treeca2460f7e8fa7dd87d2ba79301d8aa8fc7314479 /libs/ardour
parent402cc384ced6cb152c8abe4294009fe0de0a6dea (diff)
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
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/buffer_set.h4
-rw-r--r--libs/ardour/ardour/internal_return.h2
-rw-r--r--libs/ardour/ardour/internal_send.h1
-rw-r--r--libs/ardour/ardour/location.h30
-rw-r--r--libs/ardour/ardour/plugin_manager.h4
-rw-r--r--libs/ardour/ardour/processor.h14
-rw-r--r--libs/ardour/ardour/route.h4
-rw-r--r--libs/ardour/ardour/utils.h4
-rw-r--r--libs/ardour/audio_unit.cc18
-rw-r--r--libs/ardour/audioengine.cc18
-rw-r--r--libs/ardour/audiofilesource.cc8
-rw-r--r--libs/ardour/buffer_set.cc5
-rw-r--r--libs/ardour/delivery.cc15
-rw-r--r--libs/ardour/globals.cc5
-rw-r--r--libs/ardour/import.cc5
-rw-r--r--libs/ardour/internal_return.cc7
-rw-r--r--libs/ardour/internal_send.cc6
-rw-r--r--libs/ardour/location.cc26
-rw-r--r--libs/ardour/plugin.cc4
-rw-r--r--libs/ardour/plugin_insert.cc4
-rw-r--r--libs/ardour/plugin_manager.cc4
-rw-r--r--libs/ardour/port.cc4
-rw-r--r--libs/ardour/processor.cc8
-rw-r--r--libs/ardour/route.cc37
-rw-r--r--libs/ardour/session.cc41
-rw-r--r--libs/ardour/session_state.cc37
-rw-r--r--libs/ardour/session_time.cc4
-rw-r--r--libs/ardour/sndfilesource.cc4
-rw-r--r--libs/ardour/source_factory.cc4
-rw-r--r--libs/ardour/utils.cc4
-rw-r--r--libs/ardour/wscript8
31 files changed, 211 insertions, 128 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 664c22c583..1350a3c5ab 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -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"
diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h
index c057d45cc8..384f2900d8 100644
--- a/libs/ardour/ardour/internal_return.h
+++ b/libs/ardour/ardour/internal_return.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);
diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h
index 3172176897..ea2ffce3fe 100644
--- a/libs/ardour/ardour/internal_send.h
+++ b/libs/ardour/ardour/internal_send.h
@@ -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);
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index 5ee565fc1e..b008a62f18 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -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);
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h
index 7c17378df2..90f00be8b1 100644
--- a/libs/ardour/ardour/plugin_manager.h
+++ b/libs/ardour/ardour/plugin_manager.h
@@ -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>
diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h
index f91e9a6863..248f485c4f 100644
--- a/libs/ardour/ardour/processor.h
+++ b/libs/ardour/ardour/processor.h
@@ -55,19 +55,10 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
virtual ~Processor() { }
virtual bool visible() const { return true; }
-
- bool active () const { return _active; }
+ virtual void set_visible (bool) {}
- /* we keep loose tabs on the "placement" of a Processor. Ultimately,
- they are all executed as a single list, but there are some
- semantics that require knowing whether a Processor is before
- or after the fader, or panner etc. See Route::reorder_processors()
- to see where this gets set.
- */
+ bool active () const { return _active; }
- Placement placement() const { return _placement; }
- void set_placement (Placement p) { _placement = p; }
-
bool get_next_ab_is_active () const { return _next_ab_is_active; }
void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; }
@@ -116,7 +107,6 @@ protected:
ChanCount _configured_input;
ChanCount _configured_output;
void* _gui; /* generic, we don't know or care what this is */
- Placement _placement;
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 5e04837d91..f7b51c2037 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -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);
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index 19599eb348..2ccc61bb9c 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -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>
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 0d069c0c23..9b313a3659 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -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);
+ }
}
}
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 4143cb109a..7533a1ed8f 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -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 ()
{
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 3f5665ee99..f1a65edc63 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -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",
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index 589c13ce41..e02e2ba2cb 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -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"
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 0487561724..f8bba4c8e7 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -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;
}
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 26e2baca26..90f05ce325 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -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>
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index 85631b25bd..12a7db3659 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -17,6 +17,11 @@
*/
+
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <cstdio>
#include <cstdlib>
#include <string>
diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc
index f3ab1dd901..37a559649c 100644
--- a/libs/ardour/internal_return.cc
+++ b/libs/ardour/internal_return.cc
@@ -138,5 +138,8 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
return true;
}
-
-
+bool
+InternalReturn::visible () const
+{
+ return false;
+}
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 177df4222c..718e34f29e 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -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;
+}
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index dd32da2628..f6678966e4 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -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;
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 72e34aec01..e94487845e 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -17,6 +17,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <vector>
#include <string>
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index bf8f007104..461a3f0685 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -17,6 +17,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <string>
#include <sigc++/bind.h>
diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc
index c0c854180f..8728203794 100644
--- a/libs/ardour/plugin_manager.cc
+++ b/libs/ardour/plugin_manager.cc
@@ -17,6 +17,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#define __STDC_FORMAT_MACROS 1
#include <stdint.h>
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc
index 19955d2530..4b4f0a939a 100644
--- a/libs/ardour/port.cc
+++ b/libs/ardour/port.cc
@@ -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"
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc
index ece9d6becc..e3a2b0b15e 100644
--- a/libs/ardour/processor.cc
+++ b/libs/ardour/processor.cc
@@ -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;
- }
}
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 61f975689c..84b46f020c 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -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;
}
}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 58e68cb353..7abbcb49d1 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -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);
}
}
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index c05dda60cd..0946acfade 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -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."),
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 32a94adee1..3126287c6b 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -18,6 +18,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <iostream>
#include <cmath>
#include <unistd.h>
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 234f55f30b..df35dbe387 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -17,6 +17,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <cstring>
#include <cerrno>
#include <climits>
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index 544b04e1c7..2438d5f6f9 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -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"
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 9565b4450f..e12ae2cd89 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -17,6 +17,10 @@
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#define __STDC_FORMAT_MACROS 1
#include <stdint.h>
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 172047bde3..6993412ce5 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -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