aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-07-05 12:32:19 -0700
committerChris Robinson <[email protected]>2017-07-05 12:32:19 -0700
commit56a33ef955e33609236527300188115a74ddf41c (patch)
treea99a546cd363ab982bba3691c360866fe86e97af
parentdadf7a4cf2bb008fc9e20251f6e8895c0f5bf0d4 (diff)
Print the opened device in alffplay
-rw-r--r--examples/alffplay.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index f335760f..cd4507b2 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -1446,6 +1446,13 @@ int main(int argc, char *argv[])
return 1;
}
+ const ALCchar *name = nullptr;
+ if(alcIsExtensionPresent(device, "ALC_ENUMERATE_ALL_EXT"))
+ name = alcGetString(device, ALC_ALL_DEVICES_SPECIFIER);
+ if(!name || alcGetError(device) != AL_NO_ERROR)
+ name = alcGetString(device, ALC_DEVICE_SPECIFIER);
+ std::cout<< "Opened \""<<name<<"\"" <<std::endl;
+
if(fileidx < argc && strcmp(argv[fileidx], "-direct") == 0)
{
++fileidx;