aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-05-03 04:53:22 -0700
committerChris Robinson <[email protected]>2017-05-03 04:53:22 -0700
commit14b23c250268f01fbb5f0ed0ae8ff22c6a5c2810 (patch)
tree2584cad3c8cdb572d37fddf84a62b55f568bcea6 /utils
parente0ae3c7cb6f8340cfd16aa56b98b9a7e147c58ea (diff)
Print available resamplers in openal-info
Diffstat (limited to 'utils')
-rw-r--r--utils/openal-info.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/utils/openal-info.c b/utils/openal-info.c
index 5fd8784b..617550f2 100644
--- a/utils/openal-info.c
+++ b/utils/openal-info.c
@@ -251,6 +251,38 @@ static void printALInfo(void)
checkALErrors();
}
+static void printResamplerInfo(void)
+{
+ LPALGETSTRINGISOFT alGetStringiSOFT;
+ ALint num_resamplers;
+ ALint def_resampler;
+
+ if(!alIsExtensionPresent("AL_SOFT_source_resampler"))
+ {
+ printf("Resampler info not available\n");
+ return;
+ }
+
+ alGetStringiSOFT = alGetProcAddress("alGetStringiSOFT");
+
+ num_resamplers = alGetInteger(AL_NUM_RESAMPLERS_SOFT);
+ def_resampler = alGetInteger(AL_DEFAULT_RESAMPLER_SOFT);
+
+ if(!num_resamplers)
+ printf("!!! No resamplers found !!!\n");
+ else
+ {
+ ALint i;
+ printf("Available resamplers:\n");
+ for(i = 0;i < num_resamplers;++i)
+ {
+ const ALchar *name = alGetStringiSOFT(AL_RESAMPLER_NAME_SOFT, i);
+ printf(" %s%s\n", name, (i==def_resampler)?" *":"");
+ }
+ }
+ checkALErrors();
+}
+
static void printEFXInfo(ALCdevice *device)
{
ALCint major, minor, sends;
@@ -394,6 +426,7 @@ int main(int argc, char *argv[])
}
printALInfo();
+ printResamplerInfo();
printEFXInfo(device);
alcMakeContextCurrent(NULL);