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

Method serializedSize

core/src/core/path_data.cpp:492–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492uint64_t BakedPathData::serializedSize() const
493{
494 // # probes
495 uint64_t size = sizeof(int32_t);
496
497 // vis graph
498 size += mVisGraph->serializedSize();
499
500 // # valid SoundPaths
501 size += sizeof(int32_t);
502
503 // # unique SoundPaths
504 size += sizeof(int32_t);
505
506 // unique SoundPaths
507 size += mUniqueBakedPaths.totalSize() * sizeof(SoundPath);
508
509 // SoundPathRefs. For valid paths only.
510 auto numProbes = mBakedPathRefs.size(0);
511 for (auto i = 0u; i < numProbes; ++i)
512 {
513 for (auto j = 0u; j < numProbes; ++j)
514 {
515 if (mUniqueBakedPaths[mBakedPathRefs[i][j].index].isValid())
516 {
517 size += sizeof(int32_t) + sizeof(SoundPathRef);
518 }
519 }
520 }
521
522 return size;
523}
524
525flatbuffers::Offset<Serialized::BakedPathingData> BakedPathData::serialize(SerializedObject& serializedObject) const
526{

Callers 1

getDataSizeMethod · 0.45

Calls 3

totalSizeMethod · 0.45
sizeMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected