Skip to content

Commit

Permalink
Update IPlugSurroundEffect for Atmos tags
Browse files Browse the repository at this point in the history
& new meters
  • Loading branch information
olilarkin committed Mar 25, 2022
1 parent bb53718 commit f4fcf4b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions Examples/IPlugSurroundEffect/IPlugSurroundEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ uint64_t GetAPIBusTypeForChannelIOConfig(int configIdx, ERoute dir, int busIdx,
case 2: APIBusTypes->Add(kAudioChannelLayoutTag_Stereo); break;
case 6: APIBusTypes->Add(kAudioChannelLayoutTag_AudioUnit_5_1); break;
case 8: APIBusTypes->Add(kAudioChannelLayoutTag_AudioUnit_7_1); break;
#if defined (MAC_OS_VERSION_11_0)
case 10: APIBusTypes->Add(kAudioChannelLayoutTag_Atmos_7_1_2); break;
case 12: APIBusTypes->Add(kAudioChannelLayoutTag_Atmos_7_1_4); break;
#endif
default: APIBusTypes->Add(kAudioChannelLayoutTag_DiscreteInOrder | numChans); break;
}
return 0;
Expand All @@ -28,6 +32,8 @@ uint64_t GetAPIBusTypeForChannelIOConfig(int configIdx, ERoute dir, int busIdx,
case 2: return Steinberg::Vst::SpeakerArr::kStereo;
case 6: return Steinberg::Vst::SpeakerArr::k51;
case 8: return Steinberg::Vst::SpeakerArr::k71CineSideFill;
case 10: return Steinberg::Vst::SpeakerArr::k71_2;
case 12: return Steinberg::Vst::SpeakerArr::k71_4;
default: return Steinberg::Vst::SpeakerArr::kEmpty;
}
#elif defined AAX_API
Expand All @@ -38,6 +44,8 @@ uint64_t GetAPIBusTypeForChannelIOConfig(int configIdx, ERoute dir, int busIdx,
case 2: return AAX_eStemFormat_Stereo;
case 6: return AAX_eStemFormat_5_1;
case 8: return AAX_eStemFormat_7_1_DTS;
case 10: return AAX_eStemFormat_7_1_2;
case 12: return AAX_eStemFormat_7_1_4;
default: return AAX_eStemFormat_None;
}
#endif
Expand All @@ -61,8 +69,8 @@ IPlugSurroundEffect::IPlugSurroundEffect(const InstanceInfo& info)
IRECT s = b.ReduceFromRight(50.f);

const IVStyle meterStyle = DEFAULT_STYLE.WithColor(kFG, COLOR_WHITE.WithOpacity(0.3f));
pGraphics->AttachControl(new IVMeterControl<8>(b.FracRectVertical(0.5, true), "Inputs", meterStyle, EDirection::Vertical, {"1", "2", "3", "4", "5", "6", "7", "8"}), kCtrlTagInputMeter);
pGraphics->AttachControl(new IVMeterControl<8>(b.FracRectVertical(0.5, false), "Outputs", meterStyle, EDirection::Vertical, {"1", "2", "3", "4", "5", "6", "7", "8"}), kCtrlTagOutputMeter);
pGraphics->AttachControl(new IVPeakAvgMeterControl<12>(b.FracRectVertical(0.5, true), "Inputs", meterStyle, EDirection::Vertical, {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), kCtrlTagInputMeter);
pGraphics->AttachControl(new IVPeakAvgMeterControl<12>(b.FracRectVertical(0.5, false), "Outputs", meterStyle, EDirection::Vertical, {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}), kCtrlTagOutputMeter);
pGraphics->AttachControl(new IVSliderControl(s, kGain));
};
#endif
Expand Down
4 changes: 2 additions & 2 deletions Examples/IPlugSurroundEffect/IPlugSurroundEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IPlugSurroundEffect final : public Plugin
void ProcessBlock(sample** inputs, sample** outputs, int nFrames) override;
void OnIdle() override;

IPeakSender<8> mInputPeakSender;
IPeakSender<8> mOutputPeakSender;
IPeakAvgSender<12> mInputPeakSender;
IPeakAvgSender<12> mOutputPeakSender;
#endif
};
2 changes: 1 addition & 1 deletion Examples/IPlugSurroundEffect/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#define SHARED_RESOURCES_SUBPATH "IPlugSurroundEffect"

#define PLUG_CHANNEL_IO "1-1 2-2 6-6 8-8"
#define PLUG_CHANNEL_IO "1-1 2-2 6-6 8-8 10-10 12-12"

#define PLUG_LATENCY 0
#define PLUG_TYPE 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BINARY_NAME = IPlugSurroundEffect
// HEADER AND LIBRARY SEARCH PATHS
EXTRA_INC_PATHS = $(IGRAPHICS_INC_PATHS)
EXTRA_LIB_PATHS = $(IGRAPHICS_LIB_PATHS)
EXTRA_LNK_FLAGS = -framework Metal -framework MetalKit -framework OpenGL //$(IGRAPHICS_LNK_FLAGS)
EXTRA_LNK_FLAGS = -framework Metal -framework MetalKit -framework OpenGL -framework Accelerate //$(IGRAPHICS_LNK_FLAGS)

// EXTRA_APP_DEFS =
// EXTRA_PLUGIN_DEFS =
Expand Down

0 comments on commit f4fcf4b

Please sign in to comment.