mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
79a2b96d1c
The goal here is to ensure we check for audio backends in a way that makes sense. On macOS, let's just always use Audio Unit (and thus avoid any checks for Pulse, to reduce needless/confusing build log noise). We will also only use the Qt audio backend if no other backend was found, rather than only checking for Pulse.
20 lines
493 B
CMake
20 lines
493 B
CMake
include_guard()
|
|
|
|
# Audio backend -- how we output audio to the speakers.
|
|
if (APPLE AND NOT IOS)
|
|
set(LADYBIRD_AUDIO_BACKEND "AUDIO_UNIT")
|
|
return()
|
|
elseif (ANDROID)
|
|
set(LADYBIRD_AUDIO_BACKEND "OBOE")
|
|
return()
|
|
elseif (NOT WIN32)
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(PULSEAUDIO IMPORTED_TARGET libpulse)
|
|
|
|
if (PULSEAUDIO_FOUND)
|
|
set(LADYBIRD_AUDIO_BACKEND "PULSE")
|
|
return()
|
|
endif()
|
|
endif()
|
|
|
|
message(WARNING "No audio backend available")
|