MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / packChain

Function packChain

src/core/AudioEngine.cpp:3862–3871  ·  view source on GitHub ↗

Pack a stage list into the uint64_t atomic format used by the audio thread. Unused slots are TxChainStage::None (0).

Source from the content-addressed store, hash-verified

3860// Pack a stage list into the uint64_t atomic format used by the audio
3861// thread. Unused slots are TxChainStage::None (0).
3862uint64_t packChain(const QVector<AudioEngine::TxChainStage>& stages)
3863{
3864 uint64_t v = 0;
3865 const int n = std::min(static_cast<int>(stages.size()),
3866 AudioEngine::kMaxTxChainStages);
3867 for (int i = 0; i < n; ++i) {
3868 v |= static_cast<uint64_t>(static_cast<uint8_t>(stages[i])) << (i * 8);
3869 }
3870 return v;
3871}
3872
3873QVector<AudioEngine::TxChainStage> unpackChain(uint64_t v)
3874{

Callers 2

setTxChainStagesMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected