aboutsummaryrefslogtreecommitdiffstats
path: root/router/alc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-07-11 22:43:22 -0700
committerChris Robinson <[email protected]>2017-07-11 22:43:22 -0700
commit67ab9ec4662a8d47a163426193eb962772aca23f (patch)
tree629f817d37dd5b06e82e3865e4502f5ada9efc6a /router/alc.c
parent0da55fd912de74f3f5044598aff5b997df1a216e (diff)
Don't trace for every GetDriverIndexForName call
Diffstat (limited to 'router/alc.c')
-rw-r--r--router/alc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/router/alc.c b/router/alc.c
index ff2cc97c..946c7d4c 100644
--- a/router/alc.c
+++ b/router/alc.c
@@ -320,14 +320,10 @@ static ALint GetDriverIndexForName(const EnumeratedList *list, const ALCchar *na
while(devnames && *devnames)
{
if(strcmp(name, devnames) == 0)
- {
- TRACE("Found driver %d for name \"%s\"\n", *index, name);
return *index;
- }
devnames += strlen(devnames)+1;
index++;
}
- TRACE("Failed to find driver for name \"%s\"\n", name);
return -1;
}
@@ -381,8 +377,10 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename)
if(idx < 0)
{
ATOMIC_STORE_SEQ(&LastError, ALC_INVALID_VALUE);
+ TRACE("Failed to find driver for name \"%s\"\n", devicename);
return NULL;
}
+ TRACE("Found driver %d for name \"%s\"\n", idx, devicename);
device = DriverList[idx].alcOpenDevice(devicename);
}
else
@@ -394,6 +392,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename)
DriverList[i].alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT"))
{
idx = i;
+ TRACE("Using default device from driver %d\n", idx);
device = DriverList[idx].alcOpenDevice(NULL);
break;
}
@@ -829,8 +828,10 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename,
if(idx < 0)
{
ATOMIC_STORE_SEQ(&LastError, ALC_INVALID_VALUE);
+ TRACE("Failed to find driver for name \"%s\"\n", devicename);
return NULL;
}
+ TRACE("Found driver %d for name \"%s\"\n", idx, devicename);
device = DriverList[idx].alcCaptureOpenDevice(
devicename, frequency, format, buffersize
);
@@ -844,6 +845,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename,
DriverList[i].alcIsExtensionPresent(NULL, "ALC_EXT_CAPTURE"))
{
idx = i;
+ TRACE("Using default capture device from driver %d\n", idx);
device = DriverList[idx].alcCaptureOpenDevice(
NULL, frequency, format, buffersize
);