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

Method attach

ogsr_engine/xrSound/SoundRender_Target.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59extern long ov_tell_func(void* datasource);
60
61void CSoundRender_Target::attach()
62{
63 VERIFY(0 == wave);
64 VERIFY(m_pEmitter);
65 constexpr ov_callbacks ovc = {ov_read_func, ov_seek_func, ov_close_func, ov_tell_func};
66 wave = FS.r_open(m_pEmitter->source()->pname.c_str());
67 R_ASSERT3(wave && wave->length(), "Can't open wave file:", m_pEmitter->source()->pname.c_str());
68 ov_open_callbacks(wave, &ovf, NULL, 0, ovc);
69 VERIFY(0 != wave);
70}
71
72void CSoundRender_Target::dettach()
73{

Callers

nothing calls this directly

Calls 5

ov_open_callbacksFunction · 0.85
r_openMethod · 0.80
sourceMethod · 0.80
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected