diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-05-04 15:12:21 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-05-04 15:12:21 -0700 |
commit | 7d8b37f72488ce30503d97d88e804160b11c6eff (patch) | |
tree | 4814f700e5526f6302f66e56af0ba00b66e9c561 /indra/newview/llvoiceclient.h | |
parent | 2a2930d24559c4d33470099807ade5f29d460210 (diff) | |
parent | 2848d35e2cc72ba02817fc657fe248ccf91e3da8 (diff) |
Automated merge
Diffstat (limited to 'indra/newview/llvoiceclient.h')
-rw-r--r-- | indra/newview/llvoiceclient.h | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 7427ea323f..674fe317db 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -273,7 +273,11 @@ public: const LLVoiceVersionInfo getVersion(); -static const F32 OVERDRIVEN_POWER_LEVEL; + static const F32 OVERDRIVEN_POWER_LEVEL; + + static const F32 VOLUME_MIN; + static const F32 VOLUME_DEFAULT; + static const F32 VOLUME_MAX; void updateSettings(); // call after loading settings and whenever they change @@ -408,31 +412,34 @@ protected: /** * Speaker volume storage helper class **/ - class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> { LOG_CLASS(LLSpeakerVolumeStorage); public: /** - * Sets internal voluem level for specified user. + * Stores volume level for specified user. * - * @param[in] speaker_id - LLUUID of user to store volume level for - * @param[in] volume - external volume level to be stored for user. + * @param[in] speaker_id - LLUUID of user to store volume level for. + * @param[in] volume - volume level to be stored for user. */ void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); /** - * Gets stored external volume level for specified speaker. + * Gets stored volume level for specified speaker * - * If specified user is not found default level will be returned. It is equivalent of - * external level 0.5 from the 0.0..1.0 range. - * Default external level is calculated as: internal = 400 * external^2 - * Maps 0.0 to 1.0 to internal values 0-400 with default 0.5 == 100 + * @param[in] speaker_id - LLUUID of user to retrieve volume level for. + * @param[out] volume - set to stored volume if found, otherwise unmodified. + * @return - true if a stored volume is found. + */ + bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); + + /** + * Removes stored volume level for specified user. * - * @param[in] speaker_id - LLUUID of user to get his volume level + * @param[in] speaker_id - LLUUID of user to remove. */ - S32 getSpeakerVolume(const LLUUID& speaker_id); + void removeSpeakerVolume(const LLUUID& speaker_id); private: friend class LLSingleton<LLSpeakerVolumeStorage>; @@ -444,6 +451,9 @@ private: void load(); void save(); + static F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in); + static F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in); + typedef std::map<LLUUID, F32> speaker_data_map_t; speaker_data_map_t mSpeakersData; }; |