mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
The idea here is to keep a small number of sample buffers queued in the AudioServer so we don't get caught without something to play.
47 lines
831 B
C
47 lines
831 B
C
#pragma once
|
|
|
|
struct ASAPI_ServerMessage {
|
|
enum class Type {
|
|
Invalid,
|
|
Greeting,
|
|
PlayingBuffer,
|
|
FinishedPlayingBuffer,
|
|
EnqueueBufferResponse,
|
|
};
|
|
|
|
Type type { Type::Invalid };
|
|
unsigned extra_size { 0 };
|
|
bool success { true };
|
|
|
|
union {
|
|
struct {
|
|
int server_pid;
|
|
int your_client_id;
|
|
} greeting;
|
|
struct {
|
|
int buffer_id;
|
|
} playing_buffer;
|
|
};
|
|
};
|
|
|
|
struct ASAPI_ClientMessage {
|
|
enum class Type {
|
|
Invalid,
|
|
Greeting,
|
|
PlayBuffer,
|
|
EnqueueBuffer,
|
|
};
|
|
|
|
Type type { Type::Invalid };
|
|
unsigned extra_size { 0 };
|
|
|
|
union {
|
|
struct {
|
|
int client_pid;
|
|
} greeting;
|
|
struct {
|
|
int buffer_id;
|
|
} play_buffer;
|
|
};
|
|
};
|