| @@ -1448,28 +1448,16 @@ public: | |||||
| || info.unit == kAudioUnitParameterUnit_Boolean); | || info.unit == kAudioUnitParameterUnit_Boolean); | ||||
| bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean; | bool isBoolean = info.unit == kAudioUnitParameterUnit_Boolean; | ||||
| String label; | |||||
| switch (info.unit) | |||||
| auto label = [info] () -> String | |||||
| { | { | ||||
| case kAudioUnitParameterUnit_Percent: | |||||
| label = "%"; | |||||
| break; | |||||
| case kAudioUnitParameterUnit_Seconds: | |||||
| label = "s"; | |||||
| break; | |||||
| case kAudioUnitParameterUnit_Hertz: | |||||
| label = "Hz"; | |||||
| break; | |||||
| case kAudioUnitParameterUnit_Decibels: | |||||
| label = "dB"; | |||||
| break; | |||||
| case kAudioUnitParameterUnit_Milliseconds: | |||||
| label = "ms"; | |||||
| break; | |||||
| default: | |||||
| break; | |||||
| } | |||||
| if (info.unit == kAudioUnitParameterUnit_Percent) return "%"; | |||||
| if (info.unit == kAudioUnitParameterUnit_Seconds) return "s"; | |||||
| if (info.unit == kAudioUnitParameterUnit_Hertz) return "Hz"; | |||||
| if (info.unit == kAudioUnitParameterUnit_Decibels) return "dB"; | |||||
| if (info.unit == kAudioUnitParameterUnit_Milliseconds) return "ms"; | |||||
| return {}; | |||||
| }(); | |||||
| auto* parameter = new AUInstanceParameter (*this, | auto* parameter = new AUInstanceParameter (*this, | ||||
| ids[i], | ids[i], | ||||
| @@ -1830,6 +1818,7 @@ private: | |||||
| break; | break; | ||||
| case kAudioUnitEvent_PropertyChange: | |||||
| default: | default: | ||||
| if (event.mArgument.mProperty.mPropertyID == kAudioUnitProperty_ParameterList) | if (event.mArgument.mProperty.mPropertyID == kAudioUnitProperty_ParameterList) | ||||
| { | { | ||||