mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03:00
f93c0dc489
Instead of passing the PIDs back and forth in a handshake "Greet" message, just use getsockopt(SO_PEERCRED) on both sides to get the same information from the kernel. This is a nice little simplification of the IPC protocol, although it does not get rid of the handshake since we still have to pass the "client ID" from the server to each client so they know how to refer to themselves. This might not be necessary and we might be able to get rid of this later on.
22 lines
576 B
Plaintext
22 lines
576 B
Plaintext
endpoint AudioServer = 85
|
|
{
|
|
// Basic protocol
|
|
Greet() => (i32 client_id)
|
|
|
|
// Mixer functions
|
|
SetMuted(bool muted) => ()
|
|
GetMuted() => (bool muted)
|
|
GetMainMixVolume() => (i32 volume)
|
|
SetMainMixVolume(i32 volume) => ()
|
|
|
|
// Buffer playback
|
|
EnqueueBuffer(i32 buffer_id, int sample_count) => (bool success)
|
|
SetPaused(bool paused) => ()
|
|
ClearBuffer(bool paused) => ()
|
|
|
|
//Buffer information
|
|
GetRemainingSamples() => (int remaining_samples)
|
|
GetPlayedSamples() => (int played_samples)
|
|
GetPlayingBuffer() => (i32 buffer_id)
|
|
}
|