1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:27:35 +00:00

LibAudio: Create a playback class with a PulseAudio implementation

This adds an abstract `Audio::PlaybackStream` class to allow cross-
platform audio playback to be done in an opaque manner by applications
in both Serenity and Lagom.

Currently, the only supported audio API is PulseAudio, but a Serenity
implementation should be added shortly as well.
This commit is contained in:
Zaggy1024 2023-07-04 04:55:53 -05:00 committed by Andrew Kaster
parent fe672989a9
commit bc4d4f0f95
9 changed files with 1041 additions and 0 deletions

View file

@ -8,6 +8,7 @@ set(SOURCES
WavWriter.cpp
Metadata.cpp
MP3Loader.cpp
PlaybackStream.cpp
QOALoader.cpp
QOATypes.cpp
UserSampleQueue.cpp
@ -25,5 +26,17 @@ if (SERENITYOS)
)
endif()
if (HAVE_PULSEAUDIO)
list(APPEND SOURCES
PlaybackStreamPulseAudio.cpp
PulseAudioWrappers.cpp
)
endif()
serenity_lib(LibAudio audio)
target_link_libraries(LibAudio PRIVATE LibCore LibIPC LibThreading LibUnicode LibCrypto)
if (HAVE_PULSEAUDIO)
target_link_libraries(LibAudio PRIVATE pulse)
target_compile_definitions(LibAudio PRIVATE HAVE_PULSEAUDIO=1)
endif()