| 574 | |
| 575 | |
| 576 | inline ALsource *LookupSource(ALCcontext *context, ALuint id) noexcept |
| 577 | { |
| 578 | const size_t lidx{(id-1) >> 6}; |
| 579 | const ALuint slidx{(id-1) & 0x3f}; |
| 580 | |
| 581 | if UNLIKELY(lidx >= context->mSourceList.size()) |
| 582 | return nullptr; |
| 583 | SourceSubList &sublist{context->mSourceList[lidx]}; |
| 584 | if UNLIKELY(sublist.FreeMask & (1_u64 << slidx)) |
| 585 | return nullptr; |
| 586 | return sublist.Sources + slidx; |
| 587 | } |
| 588 | |
| 589 | inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) noexcept |
| 590 | { |
no test coverage detected