output: use StringIsEqual()

This commit is contained in:
Max Kellermann
2019-09-26 14:44:48 +02:00
parent d8a74802d1
commit 3d03683e7d
6 changed files with 23 additions and 23 deletions

View File

@@ -30,6 +30,7 @@
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "util/ByteOrder.hxx"
#include "util/StringAPI.hxx"
#include "util/StringBuffer.hxx"
#include "util/StringFormat.hxx"
#include "Log.hxx"
@@ -138,11 +139,11 @@ OSXOutput::OSXOutput(const ConfigBlock &block)
{
const char *device = block.GetBlockValue("device");
if (device == nullptr || 0 == strcmp(device, "default")) {
if (device == nullptr || StringIsEqual(device, "default")) {
component_subtype = kAudioUnitSubType_DefaultOutput;
device_name = nullptr;
}
else if (0 == strcmp(device, "system")) {
else if (StringIsEqual(device, "system")) {
component_subtype = kAudioUnitSubType_SystemOutput;
device_name = nullptr;
}
@@ -689,7 +690,7 @@ osx_output_set_device(OSXOutput *oo)
if (!cfname_.GetCString(name, sizeof(name)))
throw std::runtime_error("Unable to convert device name from CFStringRef to char*");
if (strcmp(oo->device_name, name) == 0) {
if (StringIsEqual(oo->device_name, name)) {
FormatDebug(osx_output_domain,
"found matching device: ID=%u, name=%s",
(unsigned)deviceids[i], name);