summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-04-25 20:10:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-04-25 20:10:42 +0000
commit81c7452615871dc91a5b77adb80d13243c8964f1 (patch)
treefce28b072fe0f72c782c46e9cddabdce584e2c22 /libs
parentbb7b3ec1a61a571014cf9c80c7e73ba563e17eaf (diff)
a) fixed pseudo-grab-retention in plugin UIs
b) inserts are properly silenced when route is muted git-svn-id: svn://localhost/trunk/ardour2@473 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/insert.h1
-rw-r--r--libs/ardour/insert.cc15
-rw-r--r--libs/gtkmm2ext/barcontroller.cc1
3 files changed, 17 insertions, 0 deletions
diff --git a/libs/ardour/ardour/insert.h b/libs/ardour/ardour/insert.h
index 803e16497d..1696e03cd1 100644
--- a/libs/ardour/ardour/insert.h
+++ b/libs/ardour/ardour/insert.h
@@ -75,6 +75,7 @@ class PortInsert : public Insert
void init ();
void run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
+ void silence (jack_nframes_t nframes, jack_nframes_t offset);
jack_nframes_t latency();
diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc
index 1c73ef9d79..285185fcac 100644
--- a/libs/ardour/insert.cc
+++ b/libs/ardour/insert.cc
@@ -877,6 +877,20 @@ PortInsert::~PortInsert ()
}
void
+PortInsert::silence (jack_nframes_t nframes, jack_nframes_t offset)
+{
+ /* io_lock, not taken: function must be called from Session::process() calltree */
+
+ /* this silences our outputs, but we need to silence our inputs as well */
+
+ for (vector<Port *>::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
+ (*i)->silence (nframes, offset);
+ }
+
+ // IO::silence (nframes, offset);
+}
+
+void
PortInsert::run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset)
{
if (n_outputs() == 0) {
@@ -897,6 +911,7 @@ PortInsert::run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes,
for (o = _outputs.begin(), n = 0; o != _outputs.end(); ++o, ++n) {
memcpy ((*o)->get_buffer (nframes) + offset, bufs[min(nbufs,n)], sizeof (Sample) * nframes);
+ (*o)->mark_silence (false);
}
/* collect input */
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc
index 3529d23e12..1ce19770e3 100644
--- a/libs/gtkmm2ext/barcontroller.cc
+++ b/libs/gtkmm2ext/barcontroller.cc
@@ -168,6 +168,7 @@ BarController::button_release (GdkEventButton* ev)
mouse_control (ev->x, ev->window, scale);
}
darea.remove_modal_grab();
+ grabbed = false;
StopGesture ();
break;