From 477b45be1be256b7496e1d45b41754c6e40ef58a Mon Sep 17 00:00:00 2001 From: Maki Date: Fri, 19 Apr 2024 02:32:29 -0400 Subject: Add toggle for PipeWire volume catcher, and refactoring --- indra/media_plugins/cef/volume_catcher.h | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index 337f2913d3..0c644b8b42 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -31,24 +31,34 @@ #include "linden_common.h" -class VolumeCatcherImpl; +class VolumeCatcherImpl +{ +public: + virtual void setVolume(F32 volume) = 0; // 0.0 - 1.0 + + // Set the left-right pan of audio sources + // where -1.0 = left, 0 = center, and 1.0 = right + virtual void setPan(F32 pan) = 0; + + virtual void pump() = 0; // call this at least a few times a second if you can - it affects how quickly we can 'catch' a new audio source and adjust its volume +}; -class VolumeCatcher +class VolumeCatcher : public virtual VolumeCatcherImpl { - public: +public: VolumeCatcher(); ~VolumeCatcher(); - void setVolume(F32 volume); // 0.0 - 1.0 - - // Set the left-right pan of audio sources - // where -1.0 = left, 0 = center, and 1.0 = right - void setPan(F32 pan); + void setVolume(F32 volume); + void setPan(F32 pan); - void pump(); // call this at least a few times a second if you can - it affects how quickly we can 'catch' a new audio source and adjust its volume - - private: + void pump(); + + void onEnablePipeWireVolumeCatcher(bool enable); + +private: VolumeCatcherImpl *pimpl; + VolumeCatcherImpl *pimpl2; }; #endif // VOLUME_CATCHER_H -- cgit v1.2.3 From e6ca21549ee1d4a23c82e12d9215ce993d99ca3e Mon Sep 17 00:00:00 2001 From: Maki Date: Sat, 20 Apr 2024 17:50:43 -0400 Subject: Only use one impl in Linux volume catcher --- indra/media_plugins/cef/volume_catcher.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index 0c644b8b42..e11ecf5881 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -58,7 +58,6 @@ public: private: VolumeCatcherImpl *pimpl; - VolumeCatcherImpl *pimpl2; }; #endif // VOLUME_CATCHER_H -- cgit v1.2.3 From cbd64336eac12f03013fd91c8068810b5239af82 Mon Sep 17 00:00:00 2001 From: Maki Date: Sun, 21 Apr 2024 20:25:31 -0400 Subject: Remove virtual inheritence for linux volume catcher --- indra/media_plugins/cef/volume_catcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index e11ecf5881..3e53a7e961 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -43,7 +43,7 @@ public: virtual void pump() = 0; // call this at least a few times a second if you can - it affects how quickly we can 'catch' a new audio source and adjust its volume }; -class VolumeCatcher : public virtual VolumeCatcherImpl +class VolumeCatcher : public VolumeCatcherImpl { public: VolumeCatcher(); -- cgit v1.2.3 From 3d1e7933e52a689bb7bcefcc22a1901a4ddf187b Mon Sep 17 00:00:00 2001 From: Maki Date: Wed, 24 Apr 2024 07:47:06 -0400 Subject: Fix building for other platforms than Linux for volume catcher --- indra/media_plugins/cef/volume_catcher.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index 3e53a7e961..dc63e4be01 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -54,7 +54,9 @@ public: void pump(); +#if LL_LINUX void onEnablePipeWireVolumeCatcher(bool enable); +#endif private: VolumeCatcherImpl *pimpl; -- cgit v1.2.3 From 1df3b323d879b3a72e47d6b866f6a7501af80aff Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 4 May 2024 21:12:50 +0200 Subject: Update volume_catcher.h Add a virtual dtor --- indra/media_plugins/cef/volume_catcher.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index dc63e4be01..37a1cfc706 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -34,6 +34,8 @@ class VolumeCatcherImpl { public: + virtual ~VolumeCatcherImpl() = default; + virtual void setVolume(F32 volume) = 0; // 0.0 - 1.0 // Set the left-right pan of audio sources -- cgit v1.2.3 From 7d62d0c5752814f27a17c86618f628d0e4ff9b0d Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 22 May 2024 13:20:39 +0200 Subject: Move Linux specific VolumeCatcherImport into the linux specific files. --- indra/media_plugins/cef/volume_catcher.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index 51a309fb97..d6ac8e9159 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -31,21 +31,9 @@ #include "linden_common.h" -class VolumeCatcherImpl -{ -public: - virtual ~VolumeCatcherImpl() = default; - - virtual void setVolume(F32 volume) = 0; // 0.0 - 1.0 - - // Set the left-right pan of audio sources - // where -1.0 = left, 0 = center, and 1.0 = right - virtual void setPan(F32 pan) = 0; - - virtual void pump() = 0; // call this at least a few times a second if you can - it affects how quickly we can 'catch' a new audio source and adjust its volume -}; +class VolumeCatcherImpl; -class VolumeCatcher : public VolumeCatcherImpl +class VolumeCatcher { public: VolumeCatcher(); -- cgit v1.2.3 From 8789d372c7617d86a30395190db4dba3b8545226 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 22 May 2024 13:31:15 +0200 Subject: Tabs to spaces. --- indra/media_plugins/cef/volume_catcher.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/media_plugins/cef/volume_catcher.h') diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h index d6ac8e9159..6933854e8e 100644 --- a/indra/media_plugins/cef/volume_catcher.h +++ b/indra/media_plugins/cef/volume_catcher.h @@ -36,20 +36,20 @@ class VolumeCatcherImpl; class VolumeCatcher { public: - VolumeCatcher(); - ~VolumeCatcher(); + VolumeCatcher(); + ~VolumeCatcher(); - void setVolume(F32 volume); - void setPan(F32 pan); + void setVolume(F32 volume); + void setPan(F32 pan); - void pump(); + void pump(); #if LL_LINUX - void onEnablePipeWireVolumeCatcher(bool enable); + void onEnablePipeWireVolumeCatcher(bool enable); #endif private: - VolumeCatcherImpl *pimpl; + VolumeCatcherImpl *pimpl; }; #endif // VOLUME_CATCHER_H -- cgit v1.2.3