Commit 723c2c7f authored by Jacob Vosmaer's avatar Jacob Vosmaer

Remove some debugging code

parent 4dd2c5cd
...@@ -128,8 +128,6 @@ osx_output_set_device(OSXOutput *oo, Error &error) ...@@ -128,8 +128,6 @@ osx_output_set_device(OSXOutput *oo, Error &error)
goto done; goto done;
} }
FormatDebug(osx_output_domain, "found %u OS X audio output devices", size);
/* what are the available audio device IDs? */ /* what are the available audio device IDs? */
numdevices = size / sizeof(AudioDeviceID); numdevices = size / sizeof(AudioDeviceID);
deviceids = new AudioDeviceID[numdevices]; deviceids = new AudioDeviceID[numdevices];
...@@ -144,8 +142,8 @@ osx_output_set_device(OSXOutput *oo, Error &error) ...@@ -144,8 +142,8 @@ osx_output_set_device(OSXOutput *oo, Error &error)
/* which audio device matches oo->device_name? */ /* which audio device matches oo->device_name? */
propaddr = { kAudioObjectPropertyName, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; propaddr = { kAudioObjectPropertyName, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
for (i = 0; i < numdevices; i++) {
size = sizeof(CFStringRef); size = sizeof(CFStringRef);
for (i = 0; i < numdevices; i++) {
status = AudioObjectGetPropertyData(deviceids[i], &propaddr, 0, nullptr, &size, &cfname); status = AudioObjectGetPropertyData(deviceids[i], &propaddr, 0, nullptr, &size, &cfname);
if (status != noErr) { if (status != noErr) {
error.Format(osx_output_domain, status, error.Format(osx_output_domain, status,
...@@ -156,13 +154,13 @@ osx_output_set_device(OSXOutput *oo, Error &error) ...@@ -156,13 +154,13 @@ osx_output_set_device(OSXOutput *oo, Error &error)
ret = false; ret = false;
goto done; goto done;
} }
if (!CFStringGetCString(cfname, name, sizeof(name), kCFStringEncodingUTF8)) { if (!CFStringGetCString(cfname, name, sizeof(name), kCFStringEncodingUTF8)) {
error.Format(osx_output_domain, "Unable to convert device name CFString to char*"); error.Format(osx_output_domain, "Unable to convert device name from CFString to char*");
ret = false; ret = false;
goto done; goto done;
} }
FormatDebug(osx_output_domain, "found OS X audio output device: %s", name);
if (strcmp(oo->device_name, name) == 0) { if (strcmp(oo->device_name, name) == 0) {
FormatDebug(osx_output_domain, FormatDebug(osx_output_domain,
"found matching device: ID=%u, name=%s", "found matching device: ID=%u, name=%s",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment