| 434 | } |
| 435 | |
| 436 | void 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 | // -------------------------------------------------------------------------------------------------------------------- |
no test coverage detected