| 145 | } |
| 146 | |
| 147 | void 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 | |
| 169 | void CSoundRender_Source::unload() |
| 170 | { |
nothing calls this directly
no test coverage detected