mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +00:00
Audio: Add per-client volume
Note: While ClientAudioStream has had a volume property, it is only now used in the mixer.
This commit is contained in:
parent
5300c9e6b4
commit
bd17da9f9e
7 changed files with 33 additions and 1 deletions
|
@ -54,4 +54,10 @@ void ClientConnection::main_mix_volume_changed(double volume)
|
|||
on_main_mix_volume_change(volume);
|
||||
}
|
||||
|
||||
void ClientConnection::client_volume_changed(double volume)
|
||||
{
|
||||
if (on_client_volume_change)
|
||||
on_client_volume_change(volume);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,11 +28,13 @@ public:
|
|||
Function<void(i32 buffer_id)> on_finish_playing_buffer;
|
||||
Function<void(bool muted)> on_muted_state_change;
|
||||
Function<void(double volume)> on_main_mix_volume_change;
|
||||
Function<void(double volume)> on_client_volume_change;
|
||||
|
||||
private:
|
||||
virtual void finished_playing_buffer(i32) override;
|
||||
virtual void muted_state_changed(bool) override;
|
||||
virtual void main_mix_volume_changed(double) override;
|
||||
virtual void client_volume_changed(double) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue