aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-12-17 15:56:30 -0800
committerChris Robinson <[email protected]>2017-12-17 15:56:30 -0800
commit8253014fe9e8cc6b7e1ea0b839e7c1a11e1524c1 (patch)
tree3a0dc563bc81c46a592b9c810a6a21bb9a12d903 /Alc
parent57e516720e6e91978360853ee37c2bbb28fbdc8f (diff)
Fix some types to make MSVC happy
Diffstat (limited to 'Alc')
-rw-r--r--Alc/converter.c2
-rw-r--r--Alc/hrtf.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/Alc/converter.c b/Alc/converter.c
index 913a3ed3..56dbc79e 100644
--- a/Alc/converter.c
+++ b/Alc/converter.c
@@ -26,7 +26,7 @@ SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType
/* Have to set the mixer FPU mode since that's what the resampler code expects. */
START_MIXER_MODE();
- step = fastf2i(minf((ALdouble)srcRate / dstRate, MAX_PITCH)*FRACTIONONE + 0.5f);
+ step = fastf2i((ALfloat)mind((ALdouble)srcRate / dstRate, MAX_PITCH)*FRACTIONONE + 0.5f);
converter->mIncrement = maxi(step, 1);
if(converter->mIncrement == FRACTIONONE)
converter->mResample = Resample_copy_C;
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 8959a0f8..54537a05 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -1057,7 +1057,7 @@ static void AddFileEntry(vector_EnumeratedHrtf *list, const_al_string filename)
/* Unfortunate that we have to duplicate AddFileEntry to take a memory buffer
* for input instead of opening the given filename.
*/
-static void AddBuiltInEntry(vector_EnumeratedHrtf *list, const_al_string filename, size_t residx)
+static void AddBuiltInEntry(vector_EnumeratedHrtf *list, const_al_string filename, ALuint residx)
{
EnumeratedHrtf entry = { AL_STRING_INIT_STATIC(), NULL };
struct HrtfEntry *loaded_entry;
@@ -1097,7 +1097,7 @@ static void AddBuiltInEntry(vector_EnumeratedHrtf *list, const_al_string filenam
);
loaded_entry->next = LoadedHrtfs;
loaded_entry->handle = hrtf;
- snprintf(loaded_entry->filename, namelen, "!"SZFMT"_%s",
+ snprintf(loaded_entry->filename, namelen, "!%u_%s",
residx, alstr_get_cstr(filename));
LoadedHrtfs = loaded_entry;
}
@@ -1285,7 +1285,7 @@ struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry)
struct FileMapping fmap;
const ALubyte *rdata;
const char *name;
- size_t residx;
+ ALuint residx;
size_t rsize;
char ch;
@@ -1301,7 +1301,7 @@ struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry)
fmap.ptr = NULL;
fmap.len = 0;
- if(sscanf(entry->filename, "!"SZFMT"%c", &residx, &ch) == 2 && ch == '_')
+ if(sscanf(entry->filename, "!%u%c", &residx, &ch) == 2 && ch == '_')
{
name = strchr(entry->filename, ch)+1;
@@ -1309,7 +1309,7 @@ struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry)
rdata = GetResource(residx, &rsize);
if(rdata == NULL || rsize == 0)
{
- ERR("Could not get resource "SZFMT", %s\n", residx, name);
+ ERR("Could not get resource %u, %s\n", residx, name);
goto done;
}
}