summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/ardour_ui.cc57
-rw-r--r--gtk2_ardour/ardour_ui.h3
-rw-r--r--gtk2_ardour/gain_meter.cc10
-rw-r--r--gtk2_ardour/keyeditor.cc2
-rw-r--r--libs/ardour/ardour/processor.h4
-rw-r--r--libs/ardour/ardour/send.h4
-rw-r--r--libs/ardour/crossfade.cc3
-rw-r--r--libs/ardour/internal_send.cc4
-rw-r--r--libs/ardour/meter.cc6
-rw-r--r--libs/ardour/route.cc18
-rw-r--r--libs/ardour/send.cc28
-rw-r--r--libs/ardour/session.cc5
-rw-r--r--libs/evoral/evoral/Parameter.hpp2
-rw-r--r--libs/surfaces/wiimote/wscript4
14 files changed, 106 insertions, 44 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index ff8d617a0a..1335dce36f 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2559,7 +2559,8 @@ ARDOUR_UI::hide_splash ()
}
void
-ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title, const string & msg)
+ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title,
+ const string& plural_msg, const string& singular_msg)
{
size_t removed;
@@ -2616,18 +2617,30 @@ require some unused files to continue to exist."));
const string dead_sound_directory = session->session_directory().dead_sound_path().to_string();
+
+
+
+ /* subst:
+ %1 - number of files removed
+ %2 - location of "dead_sounds"
+ %3 - size of files affected
+ %4 - prefix for "bytes" to produce sensible results (e.g. mega, kilo, giga)
+ */
+
+ const char* bprefix;
+
if (rep.space < 1048576.0f) {
- if (removed > 1) {
- txt.set_text (string_compose (msg, removed, _("files were"), dead_sound_directory, (float) rep.space / 1024.0f, "kilo"));
- } else {
- txt.set_text (string_compose (msg, removed, _("file was"), dead_sound_directory, (float) rep.space / 1024.0f, "kilo"));
- }
+ bprefix = X_("kilo");
+ } else if (rep.space < 1048576.0f * 1000) {
+ bprefix = X_("mega");
} else {
- if (removed > 1) {
- txt.set_text (string_compose (msg, removed, _("files were"), dead_sound_directory, (float) rep.space / 1048576.0f, "mega"));
- } else {
- txt.set_text (string_compose (msg, removed, _("file was"), dead_sound_directory, (float) rep.space / 1048576.0f, "mega"));
- }
+ bprefix = X_("giga");
+ }
+
+ if (removed > 1) {
+ txt.set_text (string_compose (plural_msg, removed, dead_sound_directory, (float) rep.space / 1024.0f, bprefix));
+ } else {
+ txt.set_text (string_compose (singular_msg, removed, dead_sound_directory, (float) rep.space / 1024.0f, bprefix));
}
dhbox.pack_start (*dimage, true, false, 5);
@@ -2723,12 +2736,19 @@ After cleanup, unused audio files will be moved to a \
display_cleanup_results (rep,
_("cleaned files"),
_("\
-The following %1 %2 not in use and \n\
+The following %1 files were not in use and \n\
have been moved to:\n\
-%3. \n\n\
+%2. \n\n\
+Flushing the wastebasket will \n\
+release an additional\n\
+%3 %4bytes of disk space.\n"),
+ _("\
+The following file was not in use and \n \
+has been moved to:\n \
+%2. \n\n\
Flushing the wastebasket will \n\
release an additional\n\
-%4 %5bytes of disk space.\n"
+%3 %4bytes of disk space.\n"
));
}
@@ -2749,9 +2769,12 @@ ARDOUR_UI::flush_trash ()
display_cleanup_results (rep,
_("deleted file"),
- _("The following %1 %2 deleted from\n\
-%3,\n\
-releasing %4 %5bytes of disk space"));
+ _("The following %1 files were deleted from\n\
+%2,\n\
+releasing %3 %4bytes of disk space"),
+ _("The following file was deleted from\n\
+%2,\n\
+releasing %3 %4bytes of disk space"));
}
void
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 10c9a870c4..acf711290a 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -615,7 +615,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::MenuItem *cleanup_item;
- void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, const std::string & msg);
+ void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title,
+ const std::string& plural_msg, const std::string& singular_msg);
void cleanup ();
void flush_trash ();
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 4f6b48666c..6ed8893752 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -167,11 +167,6 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
{
connections.clear ();
- cerr << "GM reset controls for " << r->name()
- << " pm = " << pm
- << " autocontrol = " << gc
- << endl;
-
if (!pm && !gc) {
level_meter->set_meter (0);
gain_slider->set_controllable (boost::shared_ptr<PBD::Controllable>());
@@ -377,9 +372,7 @@ void
GainMeterBase::gain_adjusted ()
{
if (!ignore_toggle) {
- if (_route) {
- _route->set_gain (slider_position_to_gain (gain_adjustment.get_value()), this);
- }
+ _gain_control->set_value (slider_position_to_gain (gain_adjustment.get_value()));
}
show_gain ();
@@ -423,7 +416,6 @@ void
GainMeterBase::update_gain_sensitive ()
{
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);
}
diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc
index 742fc7fb69..4a7d861297 100644
--- a/gtk2_ardour/keyeditor.cc
+++ b/gtk2_ardour/keyeditor.cc
@@ -172,7 +172,7 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
bool result = AccelMap::change_entry (path,
ev->keyval,
- (ModifierType) ev->state,
+ ModifierType (Keyboard::RelevantModifierKeyMask & ev->state),
true);
if (result) {
diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h
index d49c3a206b..2df10e9c69 100644
--- a/libs/ardour/ardour/processor.h
+++ b/libs/ardour/ardour/processor.h
@@ -73,8 +73,8 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
virtual void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) {}
virtual void silence (nframes_t nframes) {}
- void activate () { _active = true; ActiveChanged(); }
- void deactivate () { _active = false; ActiveChanged(); }
+ virtual void activate () { _active = true; ActiveChanged(); }
+ virtual void deactivate () { _active = false; ActiveChanged(); }
virtual bool configure_io (ChanCount in, ChanCount out);
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index d4b9bca1b3..dc57a72519 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -60,6 +60,10 @@ class Send : public Delivery
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
+ bool configure_io (ChanCount in, ChanCount out);
+
+ void activate ();
+ void deactivate ();
bool set_name (const std::string& str);
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index 62169a48df..006d32508e 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -96,6 +96,7 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR
{
_in_update = false;
_fixed = false;
+ _follow_overlap = false;
if (compute (a, b, model)) {
throw failed_constructor();
@@ -104,8 +105,6 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR
_active = act;
initialize ();
-
-
}
Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 540a6869e1..7ca9319a1e 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -83,7 +83,7 @@ InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
BufferSet& sendbufs = _session.get_mix_buffers (bufs.count());
sendbufs.read_from (bufs, nframes);
assert(sendbufs.count() == bufs.count());
-
+
/* gain control */
gain_t tgain = target_gain ();
@@ -106,7 +106,7 @@ InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
} else if (tgain != 1.0) {
- /* target gain has not changed, but is not unity */
+ /* target gain has not changed, but is not zero or unity */
Amp::apply_simple_gain (sendbufs, nframes, tgain);
}
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 3bc12f20d6..ba5ccf1501 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -177,6 +177,10 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
void
PeakMeter::meter ()
{
+ if (!_active) {
+ return;
+ }
+
assert(_visible_peak_power.size() == _peak_power.size());
const size_t limit = _peak_power.size();
@@ -187,7 +191,7 @@ PeakMeter::meter ()
float new_peak = _peak_power[n]; /* XXX we should use atomic exchange from here ... */
_peak_power[n] = 0; /* ... to here */
-
+
/* compute new visible value using falloff */
if (new_peak > 0.0) {
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 216c199041..26c0cc6616 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -695,9 +695,7 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite
}
// XXX: do we want to emit the signal here ? change call order.
- if (!boost::dynamic_pointer_cast<InternalSend>(processor)) {
- processor->activate ();
- }
+ processor->activate ();
processor->ActiveChanged.connect (bind (mem_fun (_session, &Session::update_latency_compensation), false, false));
_output->set_user_latency (0);
@@ -1344,6 +1342,7 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
// Ensure route outputs match last processor's outputs
if (out != _output->n_ports ()) {
+ cerr << "For " << _name << " out/last mismatch - out = " << out << " vs. " << _output->n_ports() << endl;
_output->ensure_io (out, false, this);
}
@@ -2649,7 +2648,20 @@ void
Route::meter ()
{
Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK);
+
_meter->meter ();
+
+ for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+
+ boost::shared_ptr<Send> s;
+ boost::shared_ptr<Return> r;
+
+ if ((s = boost::dynamic_pointer_cast<Send> (*i)) != 0) {
+ s->meter()->meter();
+ } else if ((r = boost::dynamic_pointer_cast<Return> (*i)) != 0) {
+ r->meter()->meter ();
+ }
+ }
}
boost::shared_ptr<Panner>
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index a4db60fc68..ea4c16a416 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -66,6 +66,24 @@ Send::~Send ()
}
void
+Send::activate ()
+{
+ _amp->activate ();
+ _meter->activate ();
+
+ Processor::activate ();
+}
+
+void
+Send::deactivate ()
+{
+ _amp->deactivate ();
+ _meter->deactivate ();
+
+ Processor::deactivate ();
+}
+
+void
Send::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
{
if (!_active || _output->n_ports() == ChanCount::ZERO) {
@@ -155,6 +173,16 @@ Send::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
return true;
}
+bool
+Send::configure_io (ChanCount in, ChanCount out)
+{
+ if (!_amp->configure_io (in, out) || !_meter->configure_io (in, out)) {
+ return false;
+ }
+
+ return Processor::configure_io (in, out);
+}
+
/** Set up the XML description of a send so that its name is unique.
* @param state XML send state.
* @param session Session.
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index ba6353ae39..4ed908dc7d 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1592,7 +1592,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m
}
- if (track->output()->ensure_io (ChanCount(DataType::AUDIO, 1), false, this)) {
+ if (track->output()->ensure_io (ChanCount(DataType::MIDI, 1), false, this)) {
error << "cannot configure 1 in/1 out configuration for new midi track" << endmsg;
goto failed;
}
@@ -3784,11 +3784,8 @@ Session::ensure_buffers (ChanCount howmany)
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
size_t count = std::max(_scratch_buffers->available().get(*t), howmany.get(*t));
- cerr << "Ensure bufs for scratch at " << _scratch_buffers << " mirror ? " << _scratch_buffers->is_mirror() << endl;
_scratch_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
- cerr << "Ensure bufs for mix at " << _mix_buffers << " mirror ? " << _mix_buffers->is_mirror() << endl;
_mix_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
- cerr << "Ensure bufs for silent at " << _silent_buffers << " mirror ? " << _silent_buffers->is_mirror() << endl;
_silent_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
}
diff --git a/libs/evoral/evoral/Parameter.hpp b/libs/evoral/evoral/Parameter.hpp
index 0f6d5afc4b..48701c876f 100644
--- a/libs/evoral/evoral/Parameter.hpp
+++ b/libs/evoral/evoral/Parameter.hpp
@@ -1,3 +1,4 @@
+
/* This file is part of Evoral.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
* Copyright (C) 2000-2008 Paul Davis
@@ -21,6 +22,7 @@
#include <string>
#include <map>
+#include <stdint.h>
#include <boost/shared_ptr.hpp>
#include <boost/format.hpp>
#include <iostream>
diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript
index 72dcc9d4e8..112f06e5d4 100644
--- a/libs/surfaces/wiimote/wscript
+++ b/libs/surfaces/wiimote/wscript
@@ -6,7 +6,7 @@ import os
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
+LIBARDOUR_WIIMOTE_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -30,7 +30,7 @@ def build(bld):
obj.name = 'libwiimote'
obj.target = 'wiimote'
obj.uselib_local = 'libardour libardour_cp'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.vnum = LIBARDOUR_WIIMOTE_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():