OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MusicSystem.cpp File Reference
Include dependency graph for C4MusicSystem.cpp:

Go to the source code of this file.

Functions

MusicType GetMusicFileTypeByExtension (const char *ext)
 

Function Documentation

MusicType GetMusicFileTypeByExtension ( const char *  ext)

Definition at line 644 of file C4MusicSystem.cpp.

References MUSICTYPE_MID, MUSICTYPE_MOD, MUSICTYPE_MP3, MUSICTYPE_OGG, MUSICTYPE_UNKNOWN, and SEqualNoCase().

Referenced by C4MusicSystem::Load().

645 {
646  if (SEqualNoCase(ext, "mid"))
647  return MUSICTYPE_MID;
648 #if AUDIO_TK == AUDIO_TK_SDL_MIXER
649  else if (SEqualNoCase(ext, "xm") || SEqualNoCase(ext, "it") || SEqualNoCase(ext, "s3m") || SEqualNoCase(ext, "mod"))
650  return MUSICTYPE_MOD;
651 #ifdef USE_MP3
652  else if (SEqualNoCase(ext, "mp3"))
653  return MUSICTYPE_MP3;
654 #endif
655 #endif
656  else if (SEqualNoCase(ext, "ogg"))
657  return MUSICTYPE_OGG;
658  return MUSICTYPE_UNKNOWN;
659 }
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:207

Here is the call graph for this function:

Here is the caller graph for this function: