MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / ov_read_func

Function ov_read_func

ogsr_engine/xrSound/SoundRender_Source_loader.cpp:19–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 return 0;
18}
19size_t ov_read_func(void* ptr, size_t size, size_t nmemb, void* datasource)
20{
21 IReader* F = (IReader*)datasource;
22 size_t exist_block = _max(0ul, iFloor(F->elapsed() / (float)size));
23 size_t read_block = _min(exist_block, nmemb);
24 F->r(ptr, (int)(read_block * size));
25 return read_block;
26}
27int ov_close_func(void* datasource) { return 0; }
28long ov_tell_func(void* datasource) { return ((IReader*)datasource)->tell(); }
29

Callers

nothing calls this directly

Calls 4

_maxFunction · 0.50
_minFunction · 0.50
elapsedMethod · 0.45
rMethod · 0.45

Tested by

no test coverage detected