mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibAudio: Add ClientConnection::async_enqueue()
async_enqueue() is a wrapper over the async_enqueue_buffer() call to AudioServer. This allows users to asyncronously enqueue audio samples, when the program requires non-blocking audio streaming. This also makes ClientConnection use east-const everywhere.
This commit is contained in:
parent
c8ced9f11d
commit
9d00db618d
2 changed files with 10 additions and 4 deletions
|
@ -21,8 +21,9 @@ class ClientConnection final
|
|||
public:
|
||||
ClientConnection();
|
||||
|
||||
void enqueue(const Buffer&);
|
||||
bool try_enqueue(const Buffer&);
|
||||
void enqueue(Buffer const&);
|
||||
bool try_enqueue(Buffer const&);
|
||||
void async_enqueue(Buffer const&);
|
||||
|
||||
Function<void(i32 buffer_id)> on_finish_playing_buffer;
|
||||
Function<void(bool muted)> on_muted_state_change;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue