diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-04-06 21:09:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-04-06 21:09:04 +0000 |
commit | 45cd3d519c68aa8cc2387e943c525b24d15b3648 (patch) | |
tree | 3e381c2c0ae3b4a002faec2ba5701207a20c7d4f /libs/ardour/ardour | |
parent | b437f8a13c59e3e08e3461ef03d4e3c95a3d3f90 (diff) |
add support for AudioUnit parameter listening (e.g. in non-plugin GUIs)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@9312 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audio_unit.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 548936c36b..7d2624ac5a 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -34,6 +34,7 @@ #include <AudioUnit/AudioUnit.h> #include <AudioUnit/AudioUnitProperties.h> +#include <AudioToolbox/AudioUnitUtilities.h> #include <appleutility/AUParamInfo.h> #include <boost/shared_ptr.hpp> @@ -141,6 +142,16 @@ class AUPlugin : public ARDOUR::Plugin static std::string maybe_fix_broken_au_id (const std::string&); + /* this MUST be called from thread in which you want to receive notifications + about parameter changes. + */ + int create_parameter_listener (AUEventListenerProc callback, void *arg, float interval_secs); + /* these can be called from any thread but SHOULD be called from the same thread + that will receive parameter change notifications. + */ + int listen_to_parameter (uint32_t param_id); + int end_listen_to_parameter (uint32_t param_id); + private: boost::shared_ptr<CAComponent> comp; boost::shared_ptr<CAAudioUnit> unit; @@ -184,6 +195,8 @@ class AUPlugin : public ARDOUR::Plugin nframes_t frames_processed; std::vector<AUParameterDescriptor> descriptors; + AUEventListenerRef _parameter_listener; + void * _parameter_listener_arg; void init (); void discover_factory_presets (); |