MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FreeSoundFile

Function FreeSoundFile

sndlib/soundload.cpp:321–335  ·  view source on GitHub ↗

Frees sound index n

Source from the content-addressed store, hash-verified

319
320// Frees sound index n
321void FreeSoundFile(int n) {
322 ASSERT(SoundFiles[n].used > 0);
323
324 SoundFiles[n].used = 0;
325 SoundFiles[n].name[0] = 0;
326 if (SoundFiles[n].sample_8bit) {
327 mem_free(SoundFiles[n].sample_8bit);
328 SoundFiles[n].sample_8bit = NULL;
329 }
330 if (SoundFiles[n].sample_16bit) {
331 mem_free(SoundFiles[n].sample_16bit);
332 SoundFiles[n].sample_16bit = NULL;
333 }
334 Num_sound_files--;
335}
336
337// Gets next sound file from n that has actually been alloced
338int GetNextSoundFile(int n) {

Callers 2

LoadSoundFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected