mirror of
https://github.com/RGBCube/serenity
synced 2026-01-13 20:41:00 +00:00
Client-side connection objects must now provide both client and server endpoint types. When a message is received from the server side, we try to decode it using both endpoint types and then send it to the right place for handling. This now makes it possible for AudioServer to send unsolicited messages to its clients. This opens up a ton of possibilities :^)
21 lines
606 B
Text
21 lines
606 B
Text
endpoint AudioServer = 85
|
|
{
|
|
// Basic protocol
|
|
Greet(i32 client_pid) => (i32 server_pid, 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)
|
|
}
|