summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.h
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-05-19 21:19:19 +0100
committerAimee Linden <aimee@lindenlab.com>2010-05-19 21:19:19 +0100
commit9363d9fc4b0954afc7c8bf8868733d955f770726 (patch)
treeb2c7fc5165c9bd785671d91c13dfd37b45452fe7 /indra/newview/llvoiceclient.h
parentd43ac77d1b6d1952fe3369079f6461b124466b38 (diff)
parent4f2f2f90378e5191cd00748c2cc6633af3efd230 (diff)
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra/newview/llvoiceclient.h')
-rw-r--r--indra/newview/llvoiceclient.h81
1 files changed, 75 insertions, 6 deletions
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index e08fed7ae9..5caf26c492 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -42,6 +42,7 @@ class LLVOAvatar;
#include "llviewerregion.h"
#include "llcallingcard.h" // for LLFriendObserver
#include "llsecapi.h"
+#include "llcontrol.h"
// devices
@@ -52,7 +53,7 @@ class LLVoiceClientParticipantObserver
{
public:
virtual ~LLVoiceClientParticipantObserver() { }
- virtual void onChange() = 0;
+ virtual void onParticipantsChanged() = 0;
};
@@ -109,7 +110,7 @@ public:
virtual void updateSettings()=0; // call after loading settings and whenever they change
- virtual bool isVoiceWorking()=0; // connected to a voice server and voice channel
+ virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel
virtual const LLVoiceVersionInfo& getVersion()=0;
@@ -217,8 +218,6 @@ public:
//////////////////////////
/// @name nearby speaker accessors
//@{
-
-
virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar
virtual std::string getDisplayName(const LLUUID& id)=0;
virtual BOOL isOnlineSIP(const LLUUID &id)=0;
@@ -261,6 +260,63 @@ public:
};
+//////////////////////////////////
+/// @class LLVoiceEffectObserver
+class LLVoiceEffectObserver
+{
+public:
+ virtual ~LLVoiceEffectObserver() { }
+ virtual void onVoiceEffectChanged(bool new_effects) = 0;
+};
+
+typedef std::multimap<const std::string, const LLUUID, LLDictionaryLess> voice_effect_list_t;
+
+//////////////////////////////////
+/// @class LLVoiceEffectInterface
+/// @brief Voice effect module interface
+///
+/// Voice effect modules should provide an implementation for this interface.
+/////////////////////////////////
+
+class LLVoiceEffectInterface
+{
+public:
+ LLVoiceEffectInterface() {}
+ virtual ~LLVoiceEffectInterface() {}
+
+ //////////////////////////
+ /// @name Accessors
+ //@{
+ virtual bool setVoiceEffect(const LLUUID& id) = 0;
+ virtual const LLUUID getVoiceEffect() = 0;
+ virtual LLSD getVoiceEffectProperties(const LLUUID& id) = 0;
+
+ virtual void refreshVoiceEffectLists(bool clear_lists) = 0;
+ virtual const voice_effect_list_t &getVoiceEffectList() const = 0;
+ virtual const voice_effect_list_t &getVoiceEffectTemplateList() const = 0;
+ //@}
+
+ //////////////////////////////
+ /// @name Status notification
+ //@{
+ virtual void addObserver(LLVoiceEffectObserver* observer) = 0;
+ virtual void removeObserver(LLVoiceEffectObserver* observer) = 0;
+ //@}
+
+ //////////////////////////////
+ /// @name Preview buffer
+ //@{
+ virtual void recordPreviewBuffer(bool enable) = 0;
+ virtual void playPreviewBuffer(bool enable, const LLUUID& effect_id = LLUUID::null) = 0;
+ virtual void clearPreviewBuffer() = 0;
+
+ virtual bool isPreviewRecording() = 0;
+ virtual bool isPreviewReady() = 0;
+ virtual bool isPreviewPlaying() = 0;
+ //@}
+};
+
+
class LLVoiceClient: public LLSingleton<LLVoiceClient>
{
LOG_CLASS(LLVoiceClient);
@@ -281,7 +337,7 @@ public:
void updateSettings(); // call after loading settings and whenever they change
- bool isVoiceWorking(); // connected to a voice server and voice channel
+ bool isVoiceWorking() const; // connected to a voice server and voice channel
// tuning
void tuningStart();
@@ -403,10 +459,23 @@ public:
void removeObserver(LLVoiceClientParticipantObserver* observer);
std::string sipURIFromID(const LLUUID &id);
-
+
+ //////////////////////////
+ /// @name Voice effects
+ //@{
+ bool getVoiceEffectEnabled() const { return mVoiceEffectEnabled; };
+ LLUUID getVoiceEffectDefault() const { return LLUUID(mVoiceEffectDefault); };
+
+ // Returns NULL if voice effects are not supported, or not enabled.
+ LLVoiceEffectInterface* getVoiceEffectInterface() const;
+ //@}
+
protected:
LLVoiceModuleInterface* mVoiceModule;
LLPumpIO *m_servicePump;
+
+ LLCachedControl<bool> mVoiceEffectEnabled;
+ LLCachedControl<std::string> mVoiceEffectDefault;
};
/**