diff options
author | kleines Filmröllchen <malu.bertsch@gmail.com> | 2021-07-05 14:40:02 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-05 19:33:55 +0200 |
commit | 9d00db618da3d10abc93ade84774be32170f232c (patch) | |
tree | 2440171779eae968f99fb03324192ad91ec4dc33 /Userland/Libraries/LibAudio/ClientConnection.h | |
parent | c8ced9f11d9194635f6ce09826736619ac42562b (diff) | |
download | serenity-9d00db618da3d10abc93ade84774be32170f232c.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibAudio/ClientConnection.h')
-rw-r--r-- | Userland/Libraries/LibAudio/ClientConnection.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibAudio/ClientConnection.h b/Userland/Libraries/LibAudio/ClientConnection.h index f9c0a1dca3..b69696642b 100644 --- a/Userland/Libraries/LibAudio/ClientConnection.h +++ b/Userland/Libraries/LibAudio/ClientConnection.h @@ -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; |