diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-27 12:41:41 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-27 12:41:41 +0000 |
commit | 3ee778075051a53705a159a0ff5cfbcb8cafb060 (patch) | |
tree | 3dac50ee89412df4d7167097182b6f92a7cb832b | |
parent | 507f22c7cda1eac54cd2952fd50f188e722bf6eb (diff) |
AU parameter unit is a single integer value, not a bitmask, so treat it correctly and don't interpret any unit type with bit 1 set as a boolean
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7002 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/audio_unit.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 71f90caab1..fd975ba409 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -591,10 +591,10 @@ AUPlugin::discover_parameters () d.upper = info.maxValue; d.default_value = info.defaultValue; - d.integer_step = (info.unit & kAudioUnitParameterUnit_Indexed); - d.toggled = (info.unit & kAudioUnitParameterUnit_Boolean) || + d.integer_step = (info.unit == kAudioUnitParameterUnit_Indexed); + d.toggled = (info.unit == kAudioUnitParameterUnit_Boolean) || (d.integer_step && ((d.upper - d.lower) == 1.0)); - d.sr_dependent = (info.unit & kAudioUnitParameterUnit_SampleFrames); + d.sr_dependent = (info.unit == kAudioUnitParameterUnit_SampleFrames); d.automatable = !d.toggled && !(info.flags & kAudioUnitParameterFlag_NonRealTime) && (info.flags & kAudioUnitParameterFlag_IsWritable); |