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

Function ChangeSoundFileName

sndlib/soundload.cpp:394–406  ·  view source on GitHub ↗

gets the filename from a path, plus appends our .wav extension

Source from the content-addressed store, hash-verified

392
393// gets the filename from a path, plus appends our .wav extension
394void ChangeSoundFileName(const char *src, char *dest) {
395 int limit;
396 char path[256], ext[256], filename[256];
397
398 limit = PAGENAME_LEN - 5;
399
400 ddio_SplitPath(src, path, filename, ext);
401
402 // Make sure we don't go over our name length limit
403 strncpy(dest, filename, limit);
404
405 strcat(dest, ".wav");
406}
407
408// Given a filename, loads the sound file.
409int LoadSoundFile(const char *filename, float import_volume, bool f_get_data) {

Callers 1

LoadSoundFileFunction · 0.85

Calls 1

ddio_SplitPathFunction · 0.50

Tested by

no test coverage detected