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

Method getOutputs

core/src/core/api_simulator.cpp:436–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436void CSource::getOutputs(IPLSimulationFlags flags,
437 IPLSimulationOutputs* outputs)
438{
439 if (!outputs)
440 return;
441
442 auto _source = mHandle.get();
443 if (!_source)
444 return;
445
446 if (flags & IPL_SIMULATIONFLAGS_DIRECT)
447 {
448 outputs->direct.distanceAttenuation = _source->directOutputs.directPath.distanceAttenuation;
449 for (auto iBand = 0; iBand < Bands::kNumBands; ++iBand)
450 outputs->direct.airAbsorption[iBand] = _source->directOutputs.directPath.airAbsorption[iBand];
451 outputs->direct.directivity = _source->directOutputs.directPath.directivity;
452 outputs->direct.occlusion = _source->directOutputs.directPath.occlusion;
453 for (auto iBand = 0; iBand < Bands::kNumBands; ++iBand)
454 outputs->direct.transmission[iBand] = _source->directOutputs.directPath.transmission[iBand];
455 }
456
457 if (flags & IPL_SIMULATIONFLAGS_REFLECTIONS)
458 {
459 outputs->reflections.ir = reinterpret_cast<IPLReflectionEffectIR>(&_source->reflectionOutputs.overlapSaveFIR);
460 outputs->reflections.numChannels = _source->reflectionOutputs.numChannels;
461 outputs->reflections.irSize = _source->reflectionOutputs.numSamples;
462 for (auto iBand = 0; iBand < Bands::kNumBands; ++iBand)
463 {
464 outputs->reflections.reverbTimes[iBand] = _source->reflectionOutputs.reverb.reverbTimes[iBand];
465 outputs->reflections.eq[iBand] = _source->reflectionOutputs.hybridEQ[iBand];
466 }
467 outputs->reflections.delay = _source->reflectionOutputs.hybridDelay;
468 outputs->reflections.tanSlot = _source->reflectionOutputs.tanSlot;
469 }
470
471 if (flags & IPL_SIMULATIONFLAGS_PATHING)
472 {
473 memcpy(outputs->pathing.eqCoeffs, _source->pathingOutputs.eq, Bands::kNumBands * sizeof(float));
474 outputs->pathing.shCoeffs = _source->pathingOutputs.sh.data();
475 }
476}
477
478
479// --------------------------------------------------------------------------------------------------------------------

Callers 5

iplSourceGetOutputsFunction · 0.45
iplSourceGetOutputsFunction · 0.45
iplSourceGetOutputsFunction · 0.45
iplSourceGetOutputsFunction · 0.45
iplSourceGetOutputsFunction · 0.45

Calls 2

getMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected