aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/mmdevapi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-09-10 22:15:40 -0700
committerChris Robinson <[email protected]>2015-09-10 22:15:40 -0700
commit87f3babe2ceb3e7223a82c487111a15c24a9e8a9 (patch)
tree5730286f4b53d26e3ffbd29cc1b14ff4bdb24a49 /Alc/backends/mmdevapi.c
parent9469c4c79b8dd683f8f9c53239701b15bdbfc22d (diff)
Append "on OpenAL Soft" to mmdevapi, dsound, and winmm device names
Would be nicer to have a more backend-agnostic method of doing this, Perhaps even also only when the router is being used.
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r--Alc/backends/mmdevapi.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index c5ac8512..a6a12980 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -62,6 +62,8 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x
#define X7DOT1 (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT|SPEAKER_SIDE_LEFT|SPEAKER_SIDE_RIGHT)
#define X7DOT1_WIDE (SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT|SPEAKER_FRONT_CENTER|SPEAKER_LOW_FREQUENCY|SPEAKER_BACK_LEFT|SPEAKER_BACK_RIGHT|SPEAKER_FRONT_LEFT_OF_CENTER|SPEAKER_FRONT_RIGHT_OF_CENTER)
+#define DEVNAME_TAIL " on OpenAL Soft"
+
typedef struct {
al_string name;
@@ -191,17 +193,18 @@ static void add_device(IMMDevice *device, LPCWSTR devid, vector_DevMap *list)
const DevMap *iter;
al_string_copy(&entry.name, tmpname);
- if(count != 0)
+ if(count == 0)
+ al_string_append_cstr(&entry.name, DEVNAME_TAIL);
+ else
{
char str[64];
- snprintf(str, sizeof(str), " #%d", count+1);
+ snprintf(str, sizeof(str), " #%d"DEVNAME_TAIL, count+1);
al_string_append_cstr(&entry.name, str);
}
#define MATCH_ENTRY(i) (al_string_cmp(entry.name, (i)->name) == 0)
VECTOR_FIND_IF(iter, const DevMap, *list, MATCH_ENTRY);
- if(iter == VECTOR_ITER_END(*list))
- break;
+ if(iter == VECTOR_ITER_END(*list)) break;
#undef MATCH_ENTRY
count++;
}
@@ -752,7 +755,10 @@ static HRESULT ALCmmdevPlayback_openProxy(ALCmmdevPlayback *self)
{
self->client = ptr;
if(al_string_empty(device->DeviceName))
+ {
get_device_name(self->mmdev, &device->DeviceName);
+ al_string_append_cstr(&device->DeviceName, DEVNAME_TAIL);
+ }
}
if(FAILED(hr))
@@ -1406,7 +1412,10 @@ static HRESULT ALCmmdevCapture_openProxy(ALCmmdevCapture *self)
{
self->client = ptr;
if(al_string_empty(device->DeviceName))
+ {
get_device_name(self->mmdev, &device->DeviceName);
+ al_string_append_cstr(&device->DeviceName, DEVNAME_TAIL);
+ }
}
if(FAILED(hr))