diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-05-25 03:37:19 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-05-25 03:37:19 +0100 |
commit | 138f58cf399dc319f90bab46ff72c211327e250d (patch) | |
tree | 6e1c6722b7bd9d53cb64e8add2f17d9848d0d5a7 /indra/newview/llvoiceclient.h | |
parent | a146a0f27b3ea2fadaa9e7286645a0944996309d (diff) | |
parent | 3e85291fee01680f465198d895d12fef733b146c (diff) |
Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
Diffstat (limited to 'indra/newview/llvoiceclient.h')
-rw-r--r-- | indra/newview/llvoiceclient.h | 81 |
1 files changed, 75 insertions, 6 deletions
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index e08fed7ae9..744ec84023 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 effect_list_updated) = 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 enablePreviewBuffer(bool enable) = 0; + virtual void recordPreviewBuffer() = 0; + virtual void playPreviewBuffer(const LLUUID& effect_id = LLUUID::null) = 0; + virtual void stopPreviewBuffer() = 0; + + virtual bool isPreviewRecording() = 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; }; /** |