summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-04-11 14:33:22 -0700
committerChris Robinson <[email protected]>2010-04-11 14:33:22 -0700
commitf082c7353939d233e134d1403af13dc67d8cd853 (patch)
treef19a78fecd6cc8d3bc7ba30202497d5e6e6fee82 /Alc
parentd4f8bd665f822466e401049b494da172690bf0cf (diff)
Use proper types for some variables
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 335612a9..4ce1f4d7 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -121,7 +121,8 @@ static ALvoid SetSpeakerArrangement(const char *name, ALfloat SpeakerAngle[OUTPU
char layout_str[256];
char *confkey, *next;
char *sep, *end;
- int i, val;
+ Channel val;
+ int i;
strncpy(layout_str, GetConfigValue(NULL, name, ""), sizeof(layout_str));
layout_str[255] = 0;
@@ -176,13 +177,13 @@ static ALvoid SetSpeakerArrangement(const char *name, ALfloat SpeakerAngle[OUTPU
for(i = 0;i < chans;i++)
{
- if(Speaker2Chan[i] == (Channel)val)
+ if(Speaker2Chan[i] == val)
{
- val = strtol(sep, NULL, 10);
- if(val >= -180 && val <= 180)
- SpeakerAngle[i] = val * M_PI/180.0f;
+ long angle = strtol(sep, NULL, 10);
+ if(angle >= -180 && angle <= 180)
+ SpeakerAngle[i] = angle * M_PI/180.0f;
else
- AL_PRINT("Invalid angle for speaker \"%s\": %d\n", confkey, val);
+ AL_PRINT("Invalid angle for speaker \"%s\": %ld\n", confkey, angle);
break;
}
}