mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-03 13:30:26 +01:00
Device fixes for MacOs (#6098)
* Fix setting device for newer MacOs * Fix setting device if there is an empty description
This commit is contained in:
parent
4733185d08
commit
b897651cdb
@ -248,6 +248,10 @@ bool GstEnginePipeline::Init() {
|
||||
case QVariant::Int:
|
||||
g_object_set(G_OBJECT(audiosink_), "device", device_.toInt(), nullptr);
|
||||
break;
|
||||
case QVariant::LongLong:
|
||||
g_object_set(G_OBJECT(audiosink_), "device", device_.toLongLong(),
|
||||
nullptr);
|
||||
break;
|
||||
case QVariant::String:
|
||||
g_object_set(G_OBJECT(audiosink_), "device",
|
||||
device_.toString().toUtf8().constData(), nullptr);
|
||||
|
@ -107,6 +107,7 @@ QList<DeviceFinder::Device> OsxDeviceFinder::ListDevices() {
|
||||
Device dev;
|
||||
dev.description = QString::fromUtf8(
|
||||
CFStringGetCStringPtr(*device_name, CFStringGetSystemEncoding()));
|
||||
if (dev.description.isEmpty()) dev.description = QString("Unknown device");
|
||||
dev.device_property_value = id;
|
||||
dev.icon_name = GuessIconName(dev.description);
|
||||
ret.append(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user