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

Method createPathEffect

core/src/core/api_path_effect.cpp:149–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147// --------------------------------------------------------------------------------------------------------------------
148
149IPLerror CContext::createPathEffect(IPLAudioSettings* audioSettings,
150 IPLPathEffectSettings* effectSettings,
151 IPathEffect** effect)
152{
153 if (!audioSettings || !effectSettings || !effect)
154 return IPL_STATUS_FAILURE;
155
156 if (audioSettings->samplingRate <= 0 || audioSettings->frameSize <= 0)
157 return IPL_STATUS_FAILURE;
158
159 if (effectSettings->maxOrder < 0 || 3 < effectSettings->maxOrder)
160 return IPL_STATUS_FAILURE;
161
162 try
163 {
164 auto _effect = reinterpret_cast<CPathEffect*>(gMemory().allocate(sizeof(CPathEffect), Memory::kDefaultAlignment));
165 new (_effect) CPathEffect(this, audioSettings, effectSettings);
166 *effect = _effect;
167 }
168 catch (Exception e)
169 {
170 return static_cast<IPLerror>(e.status());
171 }
172
173 return IPL_STATUS_SUCCESS;
174}
175
176}

Callers 5

iplPathEffectCreateFunction · 0.45
iplPathEffectCreateFunction · 0.45
iplPathEffectCreateFunction · 0.45
iplPathEffectCreateFunction · 0.45
iplPathEffectCreateFunction · 0.45

Calls 2

statusMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected