| 1 |
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_objc_library") |
| 2 |
|
| 3 |
package( |
| 4 |
default_applicable_licenses = ["//:license"], |
| 5 |
) |
| 6 |
|
| 7 |
licenses(["notice"]) |
| 8 |
|
| 9 |
skia_objc_library( |
| 10 |
name = "audioplayer_mac", |
| 11 |
hdrs = ["SkAudioPlayer.h"], |
| 12 |
features = ["layering_check"], |
| 13 |
non_arc_srcs = ["SkAudioPlayer_mac.mm"], |
| 14 |
sdk_frameworks = ["AVFoundation"], |
| 15 |
deps = ["//:core"], |
| 16 |
) |
| 17 |
|
| 18 |
skia_cc_library( |
| 19 |
name = "audioplayer", |
| 20 |
srcs = [ |
| 21 |
"SkAudioPlayer.cpp", |
| 22 |
] + select({ |
| 23 |
# TODO(fmalita): support platform-specific audio libs |
| 24 |
# "@platforms//os:android": ["SkAudioPlayer_oboe.cpp"], |
| 25 |
# "@platforms//os:linux": ["SkAudioPlayer_sfml.cpp"], |
| 26 |
"@platforms//os:macos": [], |
| 27 |
"//conditions:default": ["SkAudioPlayer_none.cpp"], |
| 28 |
}), |
| 29 |
hdrs = ["SkAudioPlayer.h"], |
| 30 |
features = ["layering_check"], |
| 31 |
visibility = ["//tools/viewer:__pkg__"], |
| 32 |
deps = [ |
| 33 |
"//:core", |
| 34 |
] + select({ |
| 35 |
"@platforms//os:macos": [":audioplayer_mac"], |
| 36 |
"//conditions:default": [], |
| 37 |
}), |
| 38 |
) |