diff options
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..0e3d9a5435 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; }; /** |