1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00
serenity/Servers/AudioServer
Andreas Kling e6db1b81b8 AudioServer: Begin work on a new IPC API style.
The goal here is to generate most of this code from IPC protocol
descriptions, but for now I've spelled them all out to get started.

Each message gets a wrapper class in the ASAPI_Client or ASAPI_Server
namespace. They are convertible to and from the old message structs.

The real hotness happens when you want to make a synchronous request
to the other side:

    auto response = send_sync<ASAPI_Client::GetMainMixVolume>();

Each request class knows his corresponding response class, so in the
above example, "response" will be an ASAPI_Server::DidGetMainMixVolume
object, and we can get the volume like so:

    int volume = response.volume();

For posting messages that don't expect a response, you can still use
post_message() since the message classes are convertible:

    post_message(ASAPI_Server::DidGetMainMixVolume(volume));

It's not perfect yet, but I already really like it. :^)
2019-07-29 22:39:20 +02:00
..
ASClientConnection.cpp AudioServer: Begin work on a new IPC API style. 2019-07-29 22:39:20 +02:00
ASClientConnection.h AudioServer+LibAudio: Make mixing queue-based instead of buffer-based. 2019-07-28 21:34:47 +02:00
ASEventLoop.cpp LibCore: Port CoreIPCServer to using CLocalServer. 2019-07-27 10:53:50 +02:00
ASEventLoop.h LibCore: Port CoreIPCServer to using CLocalServer. 2019-07-27 10:53:50 +02:00
ASMixer.cpp AudioServer: Add a "main mix volume" and a simple program to get/set it 2019-07-29 19:06:58 +02:00
ASMixer.h AudioServer: Add a "main mix volume" and a simple program to get/set it 2019-07-29 19:06:58 +02:00
main.cpp Work on AudioServer 2019-07-17 09:39:31 +02:00
Makefile Work on AudioServer 2019-07-17 09:39:31 +02:00