mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 13:35:07 +00:00

LibAudio now supports pausing playback, clearing the buffer queue, retrieving the played samples since the last clear and retrieving the currently playing shared buffer id
26 lines
613 B
C++
26 lines
613 B
C++
#pragma once
|
|
|
|
#include <AudioServer/AudioServerEndpoint.h>
|
|
#include <LibCore/CoreIPCClient.h>
|
|
|
|
class ABuffer;
|
|
|
|
class AClientConnection : public IPC::Client::ConnectionNG<AudioServerEndpoint> {
|
|
C_OBJECT(AClientConnection)
|
|
public:
|
|
AClientConnection();
|
|
|
|
virtual void handshake() override;
|
|
void enqueue(const ABuffer&);
|
|
bool try_enqueue(const ABuffer&);
|
|
|
|
int get_main_mix_volume();
|
|
void set_main_mix_volume(int);
|
|
|
|
int get_remaining_samples();
|
|
int get_played_samples();
|
|
int get_playing_buffer();
|
|
|
|
void set_paused(bool paused);
|
|
void clear_buffer(bool paused = false);
|
|
};
|