From 233acff3c4b6d218cbf3698886e9362796e705e2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 26 Feb 2012 22:55:50 -0800 Subject: Print enumerated dsound devices --- Alc/backends/dsound.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Alc/backends/dsound.c') diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index f18d8dd5..feca3cfa 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -124,7 +124,9 @@ static ALCboolean DSoundLoad(void) static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data) { + LPOLESTR guidstr = NULL; char str[1024]; + HRESULT hr; void *temp; int count; ALuint i; @@ -150,6 +152,13 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR } } while(i != NumPlaybackDevices); + hr = StringFromCLSID(guid, &guidstr); + if(SUCCEEDED(hr)) + { + TRACE("Got device \"%s\", GUID \"%ls\"\n", str, guidstr); + CoTaskMemFree(guidstr); + } + temp = realloc(PlaybackDeviceList, sizeof(DevMap) * (NumPlaybackDevices+1)); if(temp) { @@ -165,7 +174,9 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data) { + LPOLESTR guidstr = NULL; char str[1024]; + HRESULT hr; void *temp; int count; ALuint i; @@ -191,6 +202,13 @@ static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR d } } while(i != NumCaptureDevices); + hr = StringFromCLSID(guid, &guidstr); + if(SUCCEEDED(hr)) + { + TRACE("Got device \"%s\", GUID \"%ls\"\n", str, guidstr); + CoTaskMemFree(guidstr); + } + temp = realloc(CaptureDeviceList, sizeof(DevMap) * (NumCaptureDevices+1)); if(temp) { -- cgit v1.2.3