MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / CReflectionEffect

Method CReflectionEffect

core/src/core/api_indirect_effect.cpp:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// --------------------------------------------------------------------------------------------------------------------
34
35CReflectionEffect::CReflectionEffect(CContext* context,
36 IPLAudioSettings* audioSettings,
37 IPLReflectionEffectSettings* effectSettings)
38{
39 auto _context = context->mHandle.get();
40 if (!_context)
41 throw Exception(Status::Failure);
42
43 AudioSettings _audioSettings{};
44 _audioSettings.samplingRate = audioSettings->samplingRate;
45 _audioSettings.frameSize = audioSettings->frameSize;
46
47 IndirectEffectSettings _effectSettings{};
48 _effectSettings.type = static_cast<IndirectEffectType>(effectSettings->type);
49 _effectSettings.numChannels = effectSettings->numChannels;
50 _effectSettings.irSize = effectSettings->irSize;
51
52 new (&mHandle) Handle<IndirectEffect>(ipl::make_shared<IndirectEffect>(_audioSettings, _effectSettings), _context);
53}
54
55IReflectionEffect* CReflectionEffect::retain()
56{

Callers

nothing calls this directly

Calls 2

ExceptionClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected