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

Method load

ogsr_engine/xrSound/SoundRender_Source_loader.cpp:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void CSoundRender_Source::load(LPCSTR name)
148{
149 string_path fn, N;
150 xr_strcpy(N, name);
151 _strlwr(N);
152 if (strext(N))
153 *strext(N) = 0;
154
155 fname = N;
156
157 strconcat(sizeof(fn), fn, N, ".ogg");
158 if (!FS.exist("$level$", fn))
159 FS.update_path(fn, "$game_sounds$", fn);
160
161 ASSERT_FMT_DBG(FS.exist(fn), "! Can't find sound [%s.ogg]", N);
162 if (!FS.exist(fn))
163 FS.update_path(fn, "$game_sounds$", "$no_sound.ogg");
164
165 LoadWave(fn);
166 SoundRender->cache.cat_create(CAT, dwBytesTotal);
167}
168
169void CSoundRender_Source::unload()
170{

Callers

nothing calls this directly

Calls 5

_strlwrFunction · 0.85
strextFunction · 0.85
existMethod · 0.80
cat_createMethod · 0.80
update_pathMethod · 0.45

Tested by

no test coverage detected