first part of fixing up send/return metering ; make send-controlling faders work ; fixes from 2.X for key editor and untranslatable string; use standard name for surfaces lib version in wiimote wscript
git-svn-id: svn://localhost/ardour2/branches/3.0@5400 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
769e2c3feb
commit
20342cf264
|
@ -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\
|
||||
%4 %5bytes of disk space.\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\
|
||||
%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
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -65,6 +65,24 @@ Send::~Send ()
|
|||
GoingAway ();
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue
Block a user