aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-01-11 07:02:29 -0800
committerChris Robinson <[email protected]>2010-01-11 07:02:29 -0800
commit3d7f925d521ec8b456d60583b84ac2f97b21059a (patch)
tree32c8bd9086ab3c00b5635bdd9068c926da2b7488
parent93b584ff8419f76d934e0a6e9cbc55cf907ea259 (diff)
Add helpful values to the resampler enum
-rw-r--r--Alc/ALc.c6
-rw-r--r--Alc/ALu.c6
-rw-r--r--OpenAL32/Include/alSource.h4
3 files changed, 12 insertions, 4 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 15bb01be..fb771b24 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -268,9 +268,9 @@ static void alc_init(void)
RTPrioLevel = GetConfigValueInt(NULL, "rt-prio", 0);
- DefaultResampler = GetConfigValueInt(NULL, "resampler", LINEAR);
- if(DefaultResampler >= RESAMPLER_MAX || DefaultResampler < POINT)
- DefaultResampler = LINEAR;
+ DefaultResampler = GetConfigValueInt(NULL, "resampler", RESAMPLER_DEFAULT);
+ if(DefaultResampler >= RESAMPLER_MAX || DefaultResampler <= RESAMPLER_MIN)
+ DefaultResampler = RESAMPLER_DEFAULT;
devs = GetConfigValue(NULL, "drivers", "");
if(devs[0])
diff --git a/Alc/ALu.c b/Alc/ALu.c
index fbac9db2..53aaba3b 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1113,6 +1113,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
@@ -1162,6 +1163,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
@@ -1182,6 +1184,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
@@ -1203,6 +1206,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
@@ -1225,6 +1229,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
@@ -1247,6 +1252,7 @@ another_source:
break;
case COSINE: DO_MIX(cos_lerp);
break;
+ case RESAMPLER_MIN:
case RESAMPLER_MAX:
break;
}
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 2e1cf3de..dd9295c0 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -27,7 +27,9 @@ typedef enum {
LINEAR,
COSINE,
- RESAMPLER_MAX
+ RESAMPLER_MAX,
+ RESAMPLER_MIN = -1,
+ RESAMPLER_DEFAULT = LINEAR
} resampler_t;
extern resampler_t DefaultResampler;