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

Method createDirectEffect

core/src/core/api_direct_effect.cpp:128–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126// --------------------------------------------------------------------------------------------------------------------
127
128IPLerror CContext::createDirectEffect(IPLAudioSettings* audioSettings,
129 IPLDirectEffectSettings* effectSettings,
130 IDirectEffect** effect)
131{
132 if (!audioSettings || !effectSettings || !effect)
133 return IPL_STATUS_FAILURE;
134
135 if (audioSettings->samplingRate <= 0 || audioSettings->frameSize <= 0)
136 return IPL_STATUS_FAILURE;
137
138 try
139 {
140 auto _effect = reinterpret_cast<CDirectEffect*>(gMemory().allocate(sizeof(CDirectEffect), Memory::kDefaultAlignment));
141 new (_effect) CDirectEffect(this, audioSettings, effectSettings);
142 *effect = _effect;
143 }
144 catch (Exception e)
145 {
146 return static_cast<IPLerror>(e.status());
147 }
148
149 return IPL_STATUS_SUCCESS;
150}
151
152}

Callers 5

iplDirectEffectCreateFunction · 0.45
iplDirectEffectCreateFunction · 0.45
iplDirectEffectCreateFunction · 0.45
iplDirectEffectCreateFunction · 0.45
iplDirectEffectCreateFunction · 0.45

Calls 2

statusMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected