From 97f40457bfb0a3040e9e93805e7980a41a544ff7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 13 Feb 2008 19:41:34 +0000 Subject: [PATCH] splash updating on gdk/quartz; more filtering of automatable AU parameters git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3051 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/splash.cc | 3 ++- libs/ardour/ardour/audio_unit.h | 1 + libs/ardour/audio_unit.cc | 25 ++++++++++++++----------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 93afb0a010..1cf15cdef7 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -118,8 +118,9 @@ Splash::message (const string& msg) layout->set_markup (str); darea.queue_draw (); - Glib::RefPtr win = get_window(); + Glib::RefPtr win = darea.get_window(); if (win) { win->process_updates (true); + gdk_flush (); } } diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index b63aa5ce85..c3b99bd1a9 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -53,6 +53,7 @@ struct AUParameterDescriptor : public Plugin::ParameterDescriptor { AudioUnitElement element; float default_value; bool automatable; + AudioUnitParameterUnit unit; }; class AUPlugin : public ARDOUR::Plugin diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 6640740ad6..5e0114c49d 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -155,6 +155,15 @@ AUPlugin::discover_parameters () const CAAUParameter* param = param_info.GetParamInfo (d.id); const AudioUnitParameterInfo& info (param->ParamInfo()); + const int len = CFStringGetLength (param->GetName());; + char local_buffer[len*2]; + Boolean good = CFStringGetCString(param->GetName(),local_buffer,len*2,kCFStringEncodingMacRoman); + if (!good) { + d.label = "???"; + } else { + d.label = local_buffer; + } + d.scope = param_info.GetScope (); d.element = param_info.GetElement (); @@ -210,18 +219,12 @@ AUPlugin::discover_parameters () d.integer_step = (info.unit & kAudioUnitParameterUnit_Indexed); d.toggled = (info.unit & kAudioUnitParameterUnit_Boolean); d.sr_dependent = (info.unit & kAudioUnitParameterUnit_SampleFrames); - - d.automatable = !(info.flags & kAudioUnitParameterFlag_NonRealTime); + d.automatable = !d.toggled && + !(info.flags & kAudioUnitParameterFlag_NonRealTime) && + (info.flags & kAudioUnitParameterFlag_IsWritable); + d.logarithmic = (info.flags & kAudioUnitParameterFlag_DisplayLogarithmic); - - const int len = CFStringGetLength (param->GetName());; - char local_buffer[len*2]; - Boolean good = CFStringGetCString(param->GetName(),local_buffer,len*2,kCFStringEncodingMacRoman); - if (!good) { - d.label = "???"; - } else { - d.label = local_buffer; - } + d.unit = info.unit; d.lower = info.minValue; d.upper = info.maxValue;