Sound: detect platform API

Ref: #1454
This commit is contained in:
Carter Li
2025-01-07 11:17:01 +08:00
committed by 李通洲
parent 0e99486efe
commit ab6a770155
6 changed files with 22 additions and 10 deletions
+3
View File
@@ -58,6 +58,7 @@ static void printDevice(FFSoundOptions* options, const FFSoundDevice* device, ui
FF_FORMAT_ARG(percentageNum, "volume-percentage"),
FF_FORMAT_ARG(device->identifier, "identifier"),
FF_FORMAT_ARG(percentageBar, "volume-percentage-bar"),
FF_FORMAT_ARG(device->platformApi, "platform-api"),
}));
}
}
@@ -218,6 +219,7 @@ void ffGenerateSoundJsonResult(FF_MAYBE_UNUSED FFSoundOptions* options, yyjson_m
yyjson_mut_obj_add_strbuf(doc, obj, "name", &item->name);
yyjson_mut_obj_add_strbuf(doc, obj, "identifier", &item->identifier);
yyjson_mut_obj_add_strbuf(doc, obj, "platformApi", &item->platformApi);
}
FF_LIST_FOR_EACH(FFSoundDevice, device, result)
@@ -241,6 +243,7 @@ static FFModuleBaseInfo ffModuleInfo = {
{"Volume (in percentage num)", "volume-percentage"},
{"Identifier", "identifier"},
{"Volume (in percentage bar)", "volume-percentage-bar"},
{"Platform API used", "platform-api"},
}))
};