Do unto MIDI as thou hath done unto audio.
authorDavid Robillard <d@drobilla.net>
Wed, 31 Oct 2007 20:08:00 +0000 (20:08 +0000)
committerDavid Robillard <d@drobilla.net>
Wed, 31 Oct 2007 20:08:00 +0000 (20:08 +0000)
git-svn-id: svn://localhost/ardour2/trunk@2582 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/base_midi_port.cc

index 3757d2221d0b51d08503c852476d29e4de0bc226..e1014610b3db248b6a65e54f84bcdbb32ad24cc0 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <cassert>
 #include <iostream>
-
+#include <glib.h>
 #include <ardour/base_midi_port.h>
 #include <ardour/data_type.h>
 
@@ -61,9 +61,5 @@ BaseMidiPort::default_mixdown (const set<Port*>& ports, MidiBuffer* dest, nframe
 void 
 BaseMidiPort::set_mixdown_function (void (*func)(const set<Port*>&, MidiBuffer*, nframes_t, nframes_t, bool))
 {
-       /* caller should (but not must) hold process lock since this is an atomic operation on most platforms
-          and even if its not, it doesn't really matter.
-       */
-
-       _mixdown = func;
+       g_atomic_pointer_set(&_mixdown, func);
 }