aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-10-31 17:16:56 -0700
committerChris Robinson <[email protected]>2012-10-31 17:16:56 -0700
commit4e281350a017f35dd4c4141a20de5e5d88316e32 (patch)
tree990d60d7b3d6305979837f6032a64f4fbc1f35e0 /examples
parente868dad61c3f95008298e7870453526213ef1492 (diff)
Print the name of the device when opening it in the example apps
Diffstat (limited to 'examples')
-rw-r--r--examples/alreverb.c6
-rw-r--r--examples/common/alhelpers.c1
2 files changed, 3 insertions, 4 deletions
diff --git a/examples/alreverb.c b/examples/alreverb.c
index 13f4ec84..5001740e 100644
--- a/examples/alreverb.c
+++ b/examples/alreverb.c
@@ -223,7 +223,6 @@ static ALuint LoadSound(const char *filename)
int main(int argc, char **argv)
{
- ALCdevice *device = NULL;
EFXEAXREVERBPROPERTIES reverb = EFX_REVERB_PRESET_GENERIC;
ALuint source, buffer, effect, slot;
ALenum state;
@@ -239,10 +238,9 @@ int main(int argc, char **argv)
if(InitAL() != 0)
return 1;
- device = alcGetContextsDevice(alcGetCurrentContext());
- if(!alcIsExtensionPresent(device, "ALC_EXT_EFX"))
+ if(!alcIsExtensionPresent(alcGetContextsDevice(alcGetCurrentContext()), "ALC_EXT_EFX"))
{
- fprintf(stderr, "Error: EFX not supported on device \"%s\"\n", alcGetString(device, ALC_DEVICE_SPECIFIER));
+ fprintf(stderr, "Error: EFX not supported\n");
CloseAL();
return 1;
}
diff --git a/examples/common/alhelpers.c b/examples/common/alhelpers.c
index 84d6dad3..4582321c 100644
--- a/examples/common/alhelpers.c
+++ b/examples/common/alhelpers.c
@@ -62,6 +62,7 @@ int InitAL(void)
return 1;
}
+ printf("Opened \"%s\"\n", alcGetString(device, ALC_DEVICE_SPECIFIER));
return 0;
}