Add rate change selector

This commit is contained in:
Arkadiusz Fal
2022-04-16 22:50:37 +02:00
parent 387f29e395
commit 5cb2e1b8f0
5 changed files with 49 additions and 4 deletions

View File

@@ -225,6 +225,11 @@ final class MPVClient: ObservableObject {
mpv_set_property_async(mpv, 0, name, MPV_FORMAT_FLAG, &data)
}
func setDoubleAsync(_ name: String, _ value: Double) {
var data = value
mpv_set_property_async(mpv, 0, name, MPV_FORMAT_DOUBLE, &data)
}
private func getDouble(_ name: String) -> Double {
var data = Double()
mpv_get_property(mpv, name, MPV_FORMAT_DOUBLE, &data)