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

Function LookupBuffer

3rdparty/openal/al/buffer.cpp:340–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id)
341{
342 const size_t lidx{(id-1) >> 6};
343 const ALuint slidx{(id-1) & 0x3f};
344
345 if UNLIKELY(lidx >= device->BufferList.size())
346 return nullptr;
347 BufferSubList &sublist = device->BufferList[lidx];
348 if UNLIKELY(sublist.FreeMask & (1_u64 << slidx))
349 return nullptr;
350 return sublist.Buffers + slidx;
351}
352
353
354ALuint SanitizeAlignment(UserFmtType type, ALuint align)

Callers 3

buffer.cppFile · 0.70
LIKELYFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected