Pack a stage list into the uint64_t atomic format used by the audio thread. Unused slots are TxChainStage::None (0).
| 3860 | // Pack a stage list into the uint64_t atomic format used by the audio |
| 3861 | // thread. Unused slots are TxChainStage::None (0). |
| 3862 | uint64_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 | |
| 3873 | QVector<AudioEngine::TxChainStage> unpackChain(uint64_t v) |
| 3874 | { |
no test coverage detected