mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
62af6cd4f9
This patch removes the IPC endpoint numbers that needed to be specified in the IPC files. Since the string hash is a (hopefully) collision free number that depends on the name of the endpoint, we now use that instead. :^) Additionally, endpoint magic is now treated as a u32, because endpoint numbers were never negative anyway. For cases where the endpoint number does have to be hardcoded (a current case is LookupServer because the endpoint number must be known in LibC), the syntax has been made more explicit to avoid confusing those unfamiliar. To hardcode the endpoint magic, the following syntax is now used: endpoint EndpointName [magic=1234]
22 lines
588 B
Plaintext
22 lines
588 B
Plaintext
endpoint AudioServer
|
|
{
|
|
// Basic protocol
|
|
Greet() => ()
|
|
|
|
// Mixer functions
|
|
SetMuted(bool muted) => ()
|
|
GetMuted() => (bool muted)
|
|
GetMainMixVolume() => (i32 volume)
|
|
SetMainMixVolume(i32 volume) => ()
|
|
|
|
// Buffer playback
|
|
EnqueueBuffer(Core::AnonymousBuffer buffer, 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)
|
|
}
|