Rev 4887 | Rev 4989 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4887 | Rev 4948 | ||
---|---|---|---|
Line 1060... | Line 1060... | ||
1060 | 1060 | ||
1061 | fillemptylookups(); |
1061 | fillemptylookups(); |
1062 | 1062 | ||
1063 | return 0; |
1063 | return 0; |
1064 | }
|
1064 | }
|
- | 1065 | ||
- | 1066 | #if defined HAVE_FLAC || defined HAVE_VORBIS
|
|
- | 1067 | int32_t S_UpgradeFormat(const char *fn, char searchfirst) |
|
- | 1068 | {
|
|
- | 1069 | char *testfn, *extension; |
|
- | 1070 | int32_t fp = -1; |
|
- | 1071 | ||
- | 1072 | testfn = (char *)Xmalloc(Bstrlen(fn) + 6); |
|
- | 1073 | Bstrcpy(testfn, fn); |
|
- | 1074 | extension = Bstrrchr(testfn, '.'); |
|
- | 1075 | ||
- | 1076 | if (extension) |
|
- | 1077 | {
|
|
- | 1078 | #ifdef HAVE_FLAC
|
|
- | 1079 | Bstrcpy(extension, ".flac"); |
|
- | 1080 | fp = kopen4loadfrommod(testfn, searchfirst); |
|
- | 1081 | if (fp >= 0) |
|
- | 1082 | {
|
|
- | 1083 | Bfree(testfn); |
|
- | 1084 | return fp; |
|
- | 1085 | }
|
|
- | 1086 | #endif
|
|
- | 1087 | ||
- | 1088 | #ifdef HAVE_VORBIS
|
|
- | 1089 | Bstrcpy(extension, ".ogg"); |
|
- | 1090 | fp = kopen4loadfrommod(testfn, searchfirst); |
|
- | 1091 | if (fp >= 0) |
|
- | 1092 | {
|
|
- | 1093 | Bfree(testfn); |
|
- | 1094 | return fp; |
|
- | 1095 | }
|
|
- | 1096 | #endif
|
|
- | 1097 | }
|
|
- | 1098 | ||
- | 1099 | Bfree(testfn); |
|
- | 1100 | return -1; |
|
- | 1101 | }
|
|
- | 1102 | #endif
|