MCPcopy Create free account
hub / github.com/crownengine/crown / LookupSource

Function LookupSource

3rdparty/openal/al/source.cpp:576–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574
575
576inline 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
589inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) noexcept
590{

Callers 3

source.cppFile · 0.85
LIKELYFunction · 0.85
UpdateAllSourcePropsFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected