summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-26 22:55:50 -0800
committerChris Robinson <[email protected]>2012-02-26 22:55:50 -0800
commit233acff3c4b6d218cbf3698886e9362796e705e2 (patch)
treef58fecf6026b59aa80920aae7e2a806758028640 /Alc
parent5e625c9a687b0d83e3328c9d8421d0612b3101f2 (diff)
Print enumerated dsound devices
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/dsound.c18
1 files changed, 18 insertions, 0 deletions
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)
{