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

Method lookupShortestPath

core/src/core/path_data.cpp:423–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423SoundPath BakedPathData::lookupShortestPath(int start,
424 int end,
425 ProbePath* probePath) const
426{
427 PROFILE_FUNCTION();
428
429 SoundPath soundPath;
430
431 if (start < end)
432 {
433 soundPath = mUniqueBakedPaths[mBakedPathRefs[end][start].index];
434 std::swap(soundPath.firstProbe, soundPath.lastProbe);
435 std::swap(soundPath.probeAfterFirst, soundPath.probeBeforeLast);
436 }
437 else
438 {
439 soundPath = mUniqueBakedPaths[mBakedPathRefs[start][end].index];
440 }
441
442 if (probePath)
443 {
444 reconstructProbePath(start, end, soundPath, *probePath);
445 }
446
447 return soundPath;
448}
449
450void BakedPathData::reconstructProbePath(int start,
451 int end,

Calls

no outgoing calls

Tested by

no test coverage detected