Browse Source

AU: Fixed some missing case warnings in the hosting code

tags/2021-05-28
ed 5 years ago
parent
commit
67ccd6d255
1 changed files with 10 additions and 21 deletions
  1. +10
    -21
      modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm

+ 10
- 21
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm View File

@@ -1448,28 +1448,16 @@ public:
|| 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,
ids[i],
@@ -1830,6 +1818,7 @@ private:
break;
case kAudioUnitEvent_PropertyChange:
default:
if (event.mArgument.mProperty.mPropertyID == kAudioUnitProperty_ParameterList)
{


Loading…
Cancel
Save