Add node volume

This commit is contained in:
Joey Yakimowich-Payne 2026-01-30 09:12:28 -07:00
commit e649dea9c1
3 changed files with 157 additions and 0 deletions

View file

@ -137,6 +137,11 @@ struct RouteRule {
std::string target_node;
};
struct VolumeState {
float volume = 1.0f;
bool mute = false;
};
struct MetadataInfo {
std::string default_sink_name;
std::string default_source_name;
@ -166,6 +171,9 @@ class Client {
const VirtualNodeOptions& options = VirtualNodeOptions{});
Status RemoveNode(NodeId node);
Status SetNodeVolume(NodeId node, float volume, bool mute);
Result<VolumeState> GetNodeVolume(NodeId node) const;
Result<Link> CreateLink(PortId output, PortId input, const LinkOptions& options);
Result<Link> CreateLinkByName(std::string_view output_node,
std::string_view output_port,
@ -193,6 +201,8 @@ class Client {
Status Test_ForceDisconnect();
Status Test_TriggerPolicyCheck();
size_t Test_GetPendingAutoLinkCount() const;
Status Test_SetNodeVolume(NodeId node, float volume, bool mute);
Result<VolumeState> Test_GetNodeVolume(NodeId node) const;
#endif
private: