summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef/volume_catcher.h
diff options
context:
space:
mode:
authorMaki <maki@hotmilk.space>2024-04-19 02:32:29 -0400
committerMaki <maki@hotmilk.space>2024-04-19 02:32:29 -0400
commit477b45be1be256b7496e1d45b41754c6e40ef58a (patch)
tree24dbec258400c592af9fe04e8ba8532a63346448 /indra/media_plugins/cef/volume_catcher.h
parent09b0244f0e623dad43f579c9c7ba42ad0d53ed25 (diff)
Add toggle for PipeWire volume catcher, and refactoring
Diffstat (limited to 'indra/media_plugins/cef/volume_catcher.h')
-rw-r--r--indra/media_plugins/cef/volume_catcher.h32
1 files changed, 21 insertions, 11 deletions
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