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

Function setSource

unity/src/native/spatialize_effect.cpp:557–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void setSource(UnityAudioEffectState* state,
558 IPLSource source)
559{
560 assert(state);
561
562 auto effect = state->GetEffectData<State>();
563 if (!effect)
564 return;
565
566 if (source == effect->simulationSource[1])
567 return;
568
569 if (!effect->newSimulationSourceWritten)
570 {
571 iplSourceRelease(&effect->simulationSource[1]);
572 effect->simulationSource[1] = iplSourceRetain(source);
573
574 effect->newSimulationSourceWritten = true;
575 }
576}
577
578void getLatestSource(UnityAudioEffectState* state)
579{

Callers 1

Calls 2

iplSourceReleaseFunction · 0.50
iplSourceRetainFunction · 0.50

Tested by

no test coverage detected