1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:17:44 +00:00

Userland: Rename IPC ClientConnection => ConnectionFromClient

This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
This commit is contained in:
Itamar 2022-02-25 12:18:30 +02:00 committed by Andreas Kling
parent efac862570
commit 3a71748e5d
137 changed files with 896 additions and 896 deletions

View file

@ -7,7 +7,7 @@
#pragma once
#include "ClientConnection.h"
#include "ConnectionFromClient.h"
#include "FadingProperty.h"
#include <AK/Atomic.h>
#include <AK/Badge.h>
@ -30,11 +30,11 @@ namespace AudioServer {
// This is to prevent clipping when two streams with low headroom (e.g. normalized & compressed) are playing.
constexpr double SAMPLE_HEADROOM = 0.7;
class ClientConnection;
class ConnectionFromClient;
class ClientAudioStream : public RefCounted<ClientAudioStream> {
public:
explicit ClientAudioStream(ClientConnection&);
explicit ClientAudioStream(ConnectionFromClient&);
~ClientAudioStream() { }
bool is_full() const { return m_queue.size() >= 3; }
@ -64,7 +64,7 @@ public:
return true;
}
ClientConnection* client() { return m_client.ptr(); }
ConnectionFromClient* client() { return m_client.ptr(); }
void clear(bool paused = false)
{
@ -105,7 +105,7 @@ private:
bool m_paused { false };
bool m_muted { false };
WeakPtr<ClientConnection> m_client;
WeakPtr<ConnectionFromClient> m_client;
FadingProperty<double> m_volume { 1 };
};
@ -114,7 +114,7 @@ class Mixer : public Core::Object {
public:
virtual ~Mixer() override;
NonnullRefPtr<ClientAudioStream> create_queue(ClientConnection&);
NonnullRefPtr<ClientAudioStream> create_queue(ConnectionFromClient&);
// To the outside world, we pretend that the target volume is already reached, even though it may be still fading.
double main_volume() const { return m_main_volume.target(); }