2019-07-29 19:06:58 +02:00
|
|
|
#include <LibAudio/ABuffer.h>
|
|
|
|
#include <LibAudio/AClientConnection.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
CEventLoop loop;
|
2019-09-22 00:17:53 +02:00
|
|
|
auto audio_client = AClientConnection::construct();
|
|
|
|
audio_client->handshake();
|
2019-07-29 19:06:58 +02:00
|
|
|
|
|
|
|
if (argc > 1) {
|
2019-11-22 21:44:02 +01:00
|
|
|
if (String(argv[1]) == "-m") {
|
|
|
|
audio_client->set_muted(true);
|
|
|
|
printf("Muted.\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (String(argv[1]) == "-M") {
|
|
|
|
audio_client->set_muted(false);
|
|
|
|
printf("Unmuted.\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-29 19:06:58 +02:00
|
|
|
int new_volume = atoi(argv[1]);
|
2019-09-22 00:17:53 +02:00
|
|
|
audio_client->set_main_mix_volume(new_volume);
|
2019-07-29 19:06:58 +02:00
|
|
|
}
|
|
|
|
|
2019-09-22 00:17:53 +02:00
|
|
|
int volume = audio_client->get_main_mix_volume();
|
2019-07-29 19:06:58 +02:00
|
|
|
printf("Volume: %d\n", volume);
|
|
|
|
return 0;
|
|
|
|
}
|