MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Music_AddFile

Function Music_AddFile

src/Audio.c:418–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418static void Music_AddFile(const cc_string* path, void* obj, int isDirectory) {
419 struct StringsBuffer* files = (struct StringsBuffer*)obj;
420 static const cc_string ogg = String_FromConst(".ogg");
421
422 if (isDirectory) {
423 Directory_Enum(path, obj, Music_AddFile);
424 } else if (String_CaselessEnds(path, &ogg)) {
425 StringsBuffer_Add(files, path);
426 }
427}
428
429static void Music_RunLoop(void) {
430 struct StringsBuffer files;

Callers

nothing calls this directly

Calls 3

String_CaselessEndsFunction · 0.85
StringsBuffer_AddFunction · 0.85
Directory_EnumFunction · 0.70

Tested by

no test coverage detected