mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00

Give the mixer a main volume value (percent) that we scale all the outgoing samples by (before clipping.) Also add a simple "avol" program for querying and setting the volume: - "avol" prints the current volume. - "avol 200" sets the main mix volume to 200%
18 lines
404 B
C++
18 lines
404 B
C++
#pragma once
|
|
|
|
#include <LibAudio/ASAPI.h>
|
|
#include <LibCore/CoreIPCClient.h>
|
|
|
|
class ABuffer;
|
|
|
|
class AClientConnection : public IPC::Client::Connection<ASAPI_ServerMessage, ASAPI_ClientMessage> {
|
|
C_OBJECT(AClientConnection)
|
|
public:
|
|
AClientConnection();
|
|
|
|
virtual void handshake() override;
|
|
void enqueue(const ABuffer&);
|
|
|
|
int get_main_mix_volume();
|
|
void set_main_mix_volume(int);
|
|
};
|