llvoicevivox.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. /**
  2. * @file llvoicevivox.h
  3. * @brief Declaration of LLVoiceVivox class which is the interface to the
  4. * Vivox voice client process.
  5. *
  6. * $LicenseInfo:firstyear=2007&license=viewergpl$
  7. *
  8. * Copyright (c) 2007-2009, Linden Research, Inc.
  9. * Copyright (c) 2009-2024, Henri Beauchamp.
  10. *
  11. * Second Life Viewer Source Code
  12. * The source code in this file ("Source Code") is provided by Linden Lab
  13. * to you under the terms of the GNU General Public License, version 2.0
  14. * ("GPL"), unless you have obtained a separate licensing agreement
  15. * ("Other License"), formally executed by you and Linden Lab. Terms of
  16. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  17. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  18. *
  19. * There are special exceptions to the terms and conditions of the GPL as
  20. * it is applied to this Source Code. View the full text of the exception
  21. * in the file doc/FLOSS-exception.txt in this software distribution, or
  22. * online at
  23. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  24. *
  25. * By copying, modifying or distributing this software, you acknowledge
  26. * that you have read and understood your obligations described above,
  27. * and agree to abide by those obligations.
  28. *
  29. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  30. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  31. * COMPLETENESS OR PERFORMANCE.
  32. * $/LicenseInfo$
  33. */
  34. #ifndef LL_LLVOICEVIVOX_H
  35. #define LL_LLVOICEVIVOX_H
  36. #include "llhost.h"
  37. #include "lliosocket.h"
  38. #include "llvoiceclient.h"
  39. class LLFrameTimer;
  40. class LLProcessLauncher;
  41. class LLPumpIO;
  42. class LLTimer;
  43. class LLVOAvatar;
  44. struct XML_ParserStruct;
  45. class LLVoiceVivox final : public LLVoiceModule
  46. {
  47. friend class LLVivoxProtocolParser;
  48. friend class LLVoiceClient;
  49. protected:
  50. LOG_CLASS(LLVoiceVivox);
  51. public:
  52. LLVoiceVivox();
  53. ~LLVoiceVivox();
  54. void init(LLPumpIO* pump);
  55. void terminate();
  56. bool isVoiceWorking() const;
  57. // LLVoiceModule overrides
  58. LL_INLINE bool isVivox() const override { return true; }
  59. LL_INLINE bool isWebRTC() const override { return false; }
  60. const std::string& getName() const override;
  61. bool inProximalChannel() const override;
  62. void setSpatialChannel(const LLSD& channel_info) override;
  63. void setNonSpatialChannel(const LLSD& channel_info, bool, bool) override;
  64. void leaveNonSpatialChannel() override;
  65. void leaveAudioSession() override;
  66. void processChannels(bool enable) override;
  67. std::string sipURIFromID(const LLUUID& id) const override;
  68. #if 0 // Not used in the Cool VL Viewer
  69. void setHidden(bool hidden) override;
  70. #endif
  71. void setCaptureDevice(const std::string& device_id);
  72. void setRenderDevice(const std::string& device_id);
  73. typedef std::map<std::string, std::string> device_map_t;
  74. LL_INLINE const device_map_t& getCaptureDevices() const
  75. {
  76. return mCaptureDevices;
  77. }
  78. LL_INLINE const device_map_t& getRenderDevices() const
  79. {
  80. return mRenderDevices;
  81. }
  82. void setTuningMode(bool tuning_on);
  83. bool inTuningMode();
  84. void tuningSetMicVolume(F32 volume);
  85. #if 0 // Not used
  86. void tuningSetSpeakerVolume(F32 volume);
  87. #endif
  88. LL_INLINE F32 tuningGetEnergy() { return mTuningEnergy; }
  89. bool deviceSettingsAvailable();
  90. void refreshDeviceLists(bool clear_current_list);
  91. // Used in mute list observer
  92. void muteListChanged();
  93. /////////////////////////////
  94. // Sending updates of current state
  95. bool isCurrentChannel(const LLSD& channel_info);
  96. bool compareChannels(const LLSD& channel_info1, const LLSD& channel_info2);
  97. void setVoiceVolume(F32 volume);
  98. void setMicGain(F32 volume);
  99. // Returns -1.f when 'id' does not correspond to a participant
  100. F32 getUserVolume(const LLUUID& id);
  101. // Sets volume for specified agent, from 0-1 (where .5 is nominal)
  102. void setUserVolume(const LLUUID& id, F32 volume);
  103. void setEarLocation(S32 loc);
  104. /////////////////////////////
  105. // Accessors for data related to nearby speakers
  106. bool getIsSpeaking(const LLUUID& id);
  107. // "power" is related to "amplitude" in a defined way. I am just not sure
  108. // what the formula is...
  109. // Note: changed to return -1.f when 'id' is not in session. HB
  110. F32 getCurrentPower(const LLUUID& id);
  111. bool getIsModeratorMuted(const LLUUID& id);
  112. // This is used by the string-keyed maps below, to avoid storing the string
  113. // twice. The 'const std::string*' in the key points to a string actually
  114. // stored in the object referenced by the map. The add & delete operations
  115. // for each map allocate and delete in the right order to avoid dangling
  116. // references. The default compare operation would just compare pointers,
  117. // which is incorrect, so they must use this comparator instead.
  118. struct stringMapComparator
  119. {
  120. LL_INLINE bool operator()(const std::string* a,
  121. const std::string* b) const
  122. {
  123. return a->compare(*b) < 0;
  124. }
  125. };
  126. struct uuidMapComparator
  127. {
  128. LL_INLINE bool operator()(const LLUUID* a, const LLUUID* b) const
  129. {
  130. return *a < *b;
  131. }
  132. };
  133. class participantState
  134. {
  135. public:
  136. participantState(const std::string& uri);
  137. LL_INLINE bool isAvatar() { return mAvatarIDValid; }
  138. bool updateMuteState();
  139. public:
  140. LLUUID mAvatarID;
  141. std::string mURI;
  142. std::string mAccountName;
  143. std::string mLegacyName;
  144. std::string mGroupID;
  145. LLFrameTimer mSpeakingTimeout;
  146. S32 mVolume;
  147. S32 mUserVolume;
  148. F32 mPower;
  149. F32 mLastSpokeTimestamp;
  150. bool mIsSelf;
  151. bool mAvatarIDValid;
  152. bool mPTT;
  153. bool mIsSpeaking;
  154. bool mIsModeratorMuted;
  155. // true if this avatar is on the user's mute list (and should be muted)
  156. bool mOnMuteList;
  157. // true if this participant needs a volume command sent (either
  158. // mOnMuteList or mUserVolume has changed):
  159. bool mVolumeDirty;
  160. };
  161. typedef std::map<const std::string*, participantState*,
  162. stringMapComparator> particip_map_t;
  163. particip_map_t* getParticipantList();
  164. bool isParticipant(const LLUUID& id);
  165. void userAuthorized(const std::string& first_name,
  166. const std::string& last_name, const LLUUID& agent_id);
  167. void addObserver(LLVoiceClientStatusObserver* observerp);
  168. void removeObserver(LLVoiceClientStatusObserver* observerp);
  169. // Starts a voice session with the specified user
  170. void callUser(const LLUUID& id);
  171. // Leave the current channel
  172. void leaveChannel();
  173. bool answerInvite(std::string& session_handle);
  174. void declineInvite(std::string& session_handle);
  175. private:
  176. enum streamState
  177. {
  178. streamStateUnknown = 0,
  179. streamStateIdle,
  180. streamStateConnected,
  181. streamStateRinging,
  182. // Same as Vivox session_media_connecting enum
  183. streamStateConnecting = 6,
  184. // Same as Vivox session_media_disconnecting enum
  185. streamStateDisconnecting = 7,
  186. };
  187. typedef std::map<const LLUUID*, participantState*,
  188. uuidMapComparator> particip_id_map_t;
  189. typedef particip_id_map_t::value_type particip_id_map_val_t;
  190. class sessionState
  191. {
  192. public:
  193. sessionState();
  194. ~sessionState();
  195. LLSD getVoiceChannelInfo() const;
  196. participantState* addParticipant(const std::string& uri);
  197. // Note: after removeParticipant returns, the participant* that was
  198. // passed to it will have been deleted.
  199. // Take care not to use the pointer again after that.
  200. void removeParticipant(participantState* participant);
  201. void removeAllParticipants();
  202. participantState* findParticipant(const std::string& uri);
  203. participantState* findParticipantByID(const LLUUID& id);
  204. bool isCallBackPossible();
  205. bool isTextIMPossible();
  206. public:
  207. S32 mErrorStatusCode;
  208. LLUUID mIMSessionID;
  209. LLUUID mCallerID;
  210. std::string mHandle;
  211. std::string mGroupHandle;
  212. std::string mSIPURI;
  213. std::string mAlias;
  214. std::string mName;
  215. std::string mAlternateSIPURI;
  216. std::string mHash; // Channel password
  217. std::string mErrorStatusString;
  218. particip_map_t mParticipantsByURI;
  219. particip_id_map_t mParticipantsByUUID;
  220. // True if a Session.Create has been sent for this session and no
  221. // response has been received yet:
  222. bool mCreateInProgress;
  223. // True if a Session.MediaConnect has been sent for this session and no
  224. // response has been received yet:
  225. bool mMediaConnectInProgress;
  226. // True if a voice invite is pending for this session (usually waiting
  227. // on a name lookup):
  228. bool mVoiceInvitePending;
  229. // True if the caller ID is a hash of the SIP URI (this means we should
  230. // not do a name lookup):
  231. bool mSynthesizedCallerID;
  232. // True for both group and spatial channels (false for p2p, PSTN):
  233. bool mIsChannel;
  234. bool mIsSpatial; // true for spatial channels
  235. bool mIsP2P;
  236. bool mIncoming;
  237. bool mVoiceEnabled;
  238. bool mProcessChannels;
  239. // Whether we should try to reconnect to this session if it's dropped:
  240. bool mReconnect;
  241. // Set to true when the mute state of someone in the participant list
  242. // changes. The code will have to walk the list to find the changed
  243. // participant(s):
  244. bool mVolumeDirty;
  245. };
  246. participantState* findParticipantByID(const LLUUID& id);
  247. sessionState* findSession(const std::string& handle);
  248. sessionState* findSessionBeingCreatedByURI(const std::string& uri);
  249. sessionState* findSession(const LLUUID& participant_id);
  250. sessionState* addSession(const std::string& uri,
  251. const std::string& handle = LLStringUtil::null);
  252. void setSessionHandle(sessionState* sessionp,
  253. const std::string& handle = LLStringUtil::null);
  254. void setSessionURI(sessionState* sessionp, const std::string& uri);
  255. void deleteSession(sessionState* sessionp);
  256. void deleteAllSessions();
  257. void verifySessionState();
  258. // This is called in several places where the session _may_ need to be
  259. // deleted. It contains logic for whether to delete the session or keep it
  260. // around.
  261. void reapSession(sessionState* sessionp);
  262. // Returns true if the session seems to indicate we've moved to a region on
  263. // a different voice server
  264. bool sessionNeedsRelog(sessionState* sessionp);
  265. // Pokes the state machine to shut down the connector and restart it.
  266. void requestRelog();
  267. void setVoiceEnabled(bool enabled);
  268. LL_INLINE void clearCaptureDevices() { mCaptureDevices.clear(); }
  269. void addCaptureDevice(const std::string& display_name,
  270. const std::string& device_id);
  271. LL_INLINE void clearRenderDevices() { mRenderDevices.clear(); }
  272. void addRenderDevice(const std::string& display_name,
  273. const std::string& device_id);
  274. void tuningRenderStartSendMessage(const std::string& name, bool loop);
  275. void tuningRenderStopSendMessage();
  276. void tuningCaptureStartSendMessage(S32 duration);
  277. void tuningCaptureStopSendMessage();
  278. // Call this if the connection to the daemon terminates unexpectedly. It
  279. // will attempt to reset everything and relaunch.
  280. void daemonDied();
  281. // Call this if we're just giving up on voice (can't provision an account,
  282. // etc). It will clean up and go away.
  283. void giveUp();
  284. /////////////////////////////
  285. // Session control messages
  286. void connectorCreate();
  287. void connectorShutdown();
  288. void closeSocket();
  289. void requestVoiceAccountProvision(S32 retries = 3);
  290. void login(const std::string& account_name, const std::string& password,
  291. const std::string& sip_uri_hostname,
  292. const std::string& account_server_uri);
  293. void loginSendMessage();
  294. void logout();
  295. void logoutSendMessage();
  296. // Pokes the state machine to leave the audio session next time around.
  297. void sessionTerminate();
  298. void lookupName(const LLUUID& id);
  299. static void onAvatarNameLookup(const LLUUID& id,
  300. const std::string& fullname, bool);
  301. void avatarNameResolved(const LLUUID& id, const std::string& name);
  302. /////////////////////////////
  303. // Response/Event handlers
  304. void connectorCreateResponse(S32 status_code, std::string& status_str,
  305. std::string& connector_handle,
  306. std::string& version_id);
  307. void loginResponse(S32 status_code, std::string& status_str,
  308. std::string& account_handle, S32 aliases_number);
  309. void sessionCreateResponse(std::string& request_id, S32 status_code,
  310. std::string& status_str,
  311. std::string& session_handle);
  312. void sessionGroupAddSessionResponse(std::string& request_id, S32 status_code,
  313. std::string& status_str,
  314. std::string& session_handle);
  315. void sessionConnectResponse(std::string& request_id, S32 status_code,
  316. std::string& status_str);
  317. void logoutResponse(S32 status_code, std::string& status_str);
  318. void connectorShutdownResponse(S32 status_code, std::string& status_str);
  319. void accountLoginStateChangeEvent(std::string& account_handle,
  320. S32 status_code,
  321. std::string& status_str, S32 state);
  322. void mediaStreamUpdatedEvent(std::string& session_handle,
  323. std::string& session_grp_handle,
  324. S32 status_code, std::string& status_str,
  325. S32 state, bool incoming);
  326. void sessionAddedEvent(std::string& uri_str, std::string& alias,
  327. std::string& session_handle,
  328. std::string& session_grp_handle,
  329. bool is_channel, bool incoming,
  330. std::string& name_str);
  331. void sessionRemovedEvent(std::string& session_handle,
  332. std::string& session_grp_handle);
  333. void participantAddedEvent(std::string& session_handle,
  334. std::string& session_grp_handle,
  335. std::string& uri_str, std::string& alias,
  336. std::string& name_str,
  337. std::string& display_name_str,
  338. S32 participantType);
  339. void participantRemovedEvent(std::string& session_handle,
  340. std::string& session_grp_handle,
  341. std::string& uri_str, std::string& alias,
  342. std::string& name_str);
  343. void participantUpdatedEvent(std::string& session_handle,
  344. std::string& session_grp_handle,
  345. std::string& uri_str, std::string& alias,
  346. bool muted_by_moderator, bool speaking,
  347. S32 volume, F32 energy);
  348. void messageEvent(std::string& session_handle, std::string& uri_str,
  349. std::string& alias, std::string& msg_header,
  350. std::string& msg_body);
  351. void sessionNotificationEvent(std::string& session_handle,
  352. std::string& uri_str,
  353. std::string& notif_type);
  354. LL_INLINE void auxAudioPropertiesEvent(F32 energy) { mTuningEnergy = energy; }
  355. void joinedAudioSession(sessionState* sessionp);
  356. void leftAudioSession(sessionState* sessionp);
  357. void sessionCreateSendMessage(sessionState* sessionp,
  358. bool start_audio = true,
  359. bool start_text = false);
  360. void sessionGroupAddSessionSendMessage(sessionState* sessionp,
  361. bool start_audio = true,
  362. bool start_text = false);
  363. // Just joins the audio session:
  364. void sessionMediaConnectSendMessage(sessionState* sessionp);
  365. // Just joins the text session:
  366. void sessionTextConnectSendMessage(sessionState* sessionp);
  367. void sessionGroupTerminateSendMessage(sessionState* sessionp);
  368. bool writeString(const std::string& str);
  369. void getCaptureDevicesSendMessage();
  370. void getRenderDevicesSendMessage();
  371. /////////////////////////////
  372. // Sending updates of current state
  373. void setCameraPosition(const LLVector3d& position,
  374. const LLVector3& velocity,
  375. const LLMatrix3& rot);
  376. void setAvatarPosition(const LLVector3d& position,
  377. const LLVector3& velocity,
  378. const LLMatrix3& rot);
  379. void updatePosition();
  380. // Internal state for a simple state machine. This is used to deal with the
  381. // asynchronous nature of some of the messages. Note: if you change this
  382. // list, please make corresponding changes to LLVoiceClient::state2string()
  383. enum state
  384. {
  385. stateDisableCleanup,
  386. stateDisabled, // Voice is turned off.
  387. stateStart, // Class is initialized, socket is created
  388. stateDaemonLaunched, // Daemon has been launched
  389. stateConnecting, // connect() call has been issued
  390. stateConnected, // connection to the daemon has been made, send some initial setup commands.
  391. stateIdle, // socket is connected, ready for messaging
  392. stateMicTuningStart,
  393. stateMicTuningRunning,
  394. stateMicTuningStop,
  395. stateConnectorStart, // connector needs to be started
  396. stateConnectorStarting, // waiting for connector handle
  397. stateConnectorStarted, // connector handle received
  398. stateLoginRetry, // need to retry login (failed due to changing password)
  399. stateLoginRetryWait, // waiting for retry timer
  400. stateNeedsLogin, // send login request
  401. stateLoggingIn, // waiting for account handle
  402. stateLoggedIn, // account handle received
  403. stateNoChannel, //
  404. stateJoiningSession, // waiting for session handle
  405. stateSessionJoined, // session handle received
  406. stateRunning, // in session, steady state
  407. stateLeavingSession, // waiting for terminate session response
  408. stateSessionTerminated, // waiting for terminate session response
  409. stateLoggingOut, // waiting for logout response
  410. stateLoggedOut, // logout response received
  411. stateConnectorStopping, // waiting for connector stop
  412. stateConnectorStopped, // connector stop received
  413. // We go to this state if the login fails because the account needs to
  414. // be provisioned.
  415. // Error states. No way to recover from these yet.
  416. stateConnectorFailed,
  417. stateConnectorFailedWaiting,
  418. stateLoginFailed,
  419. stateLoginFailedWaiting,
  420. stateJoinSessionFailed,
  421. stateJoinSessionFailedWaiting,
  422. // Go here when all else has failed. Nothing will be retried, we are done.
  423. stateJail
  424. };
  425. void setState(state new_state);
  426. void stateMachine();
  427. // This should be called when the code detects we have changed parcels.
  428. // It initiates the call to the server that gets the parcel channel.
  429. void parcelChanged();
  430. void switchChannel(std::string uri = std::string(),
  431. bool spatial = true, bool no_reconnect = false,
  432. bool is_p2p = false, std::string hash = "");
  433. void joinSession(sessionState* sessionp);
  434. std::string sipURIFromName(std::string& name) const;
  435. bool inSpatialChannel() const;
  436. LLSD getAudioSessionChannelInfo() const;
  437. std::string getAudioSessionHandle() const;
  438. void sendPositionalUpdate();
  439. void buildSetCaptureDevice(std::ostringstream& stream);
  440. void buildSetRenderDevice(std::ostringstream& stream);
  441. void buildLocalAudioUpdates(std::ostringstream& stream);
  442. void setupVADParams();
  443. void enforceTether();
  444. void notifyParticipantObservers();
  445. void notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status);
  446. // This tries and kills the SLVoice daemon.
  447. void killDaemon();
  448. static void idle(void* user_data);
  449. static std::string nameFromID(const LLUUID& id);
  450. static bool IDFromName(const std::string name, LLUUID& id);
  451. // Returns the name portion of the SIP URI if the string looks vaguely
  452. // like a SIP URI, or an empty string if not.
  453. static std::string nameFromsipURI(const std::string& uri);
  454. static std::string state2string(state new_state);
  455. static void voiceAccountProvisionCoro(const std::string& url, S32 retries);
  456. static void parcelVoiceInfoRequestCoro(const std::string& url);
  457. private:
  458. LLPumpIO* mPump;
  459. LLProcessLauncher* mProcess;
  460. state mState;
  461. // Session state for the current audio session
  462. sessionState* mAudioSession;
  463. // Session state for the audio session we are trying to join
  464. sessionState* mNextAudioSession;
  465. U32 mRetries;
  466. U32 mLogLevel;
  467. S32 mLoginRetryCount;
  468. S32 mNumberOfAliases;
  469. U32 mCommandCookie;
  470. S32 mSpeakerVolume;
  471. enum
  472. {
  473. earLocCamera = 0, // Ear at camera
  474. earLocAvatar, // Ear at avatar
  475. earLocMixed // Ear at avatar location/camera direction
  476. };
  477. S32 mEarLocation;
  478. S32 mMicVolume;
  479. // State to return to when we leave tuning mode
  480. state mTuningExitState;
  481. F32 mTuningEnergy;
  482. S32 mTuningMicVolume;
  483. S32 mTuningSpeakerVolume;
  484. LLHost mDaemonHost;
  485. LLSocket::ptr_t mSocket;
  486. std::string mAccountName;
  487. std::string mAccountPassword;
  488. std::string mAccountDisplayName;
  489. std::string mAccountFirstName;
  490. std::string mAccountLastName;
  491. std::string mTuningAudioFile;
  492. std::string mSpatialSessionURI;
  493. std::string mSpatialSessionCredentials;
  494. // Name of the channel to be looked up
  495. std::string mChannelName;
  496. // Returned by "Create Connector" message
  497. std::string mConnectorHandle;
  498. // Returned by login message
  499. std::string mAccountHandle;
  500. std::string mVoiceAccountServerURI;
  501. std::string mVoiceSIPURIHostName;
  502. std::string mCaptureDevice;
  503. std::string mRenderDevice;
  504. // Active sessions, indexed by session handle. Sessions which are being
  505. // initiated may not be in this map.
  506. typedef std::map<const std::string*, sessionState*,
  507. stringMapComparator> session_map_t;
  508. session_map_t mSessionsByHandle;
  509. device_map_t mCaptureDevices;
  510. device_map_t mRenderDevices;
  511. std::string mWriteString;
  512. LLVector3d mCameraPosition;
  513. LLVector3d mCameraRequestedPosition;
  514. LLVector3 mCameraVelocity;
  515. LLMatrix3 mCameraRot;
  516. LLVector3d mAvatarPosition;
  517. LLVector3 mAvatarVelocity;
  518. LLMatrix3 mAvatarRot;
  519. LLTimer mUpdateTimer;
  520. // All sessions, not indexed. This is the canonical session list.
  521. typedef std::set<sessionState*> session_set_t;
  522. typedef session_set_t::iterator session_set_it_t;
  523. session_set_t mSessions;
  524. typedef std::set<LLVoiceClientStatusObserver*> status_observer_set_t;
  525. status_observer_set_t mStatusObservers;
  526. bool mTerminated;
  527. bool mVoiceEnabled;
  528. bool mProcessChannels;
  529. bool mAccountLoggedIn;
  530. bool mConnectorEstablished;
  531. #if LL_LINUX
  532. // When true, denotes the use of the deprecated native Linux client
  533. bool mDeprecatedClient;
  534. #endif
  535. bool mConnected;
  536. bool mSessionTerminateRequested;
  537. bool mRelogRequested;
  538. bool mCaptureDeviceDirty;
  539. bool mRenderDeviceDirty;
  540. bool mTuningMode;
  541. bool mTuningMicVolumeDirty;
  542. bool mTuningSpeakerVolumeDirty;
  543. bool mSpatialCoordsDirty;
  544. bool mSpeakerVolumeDirty;
  545. bool mSpeakerMuteDirty;
  546. bool mMicVolumeDirty;
  547. bool mPTT;
  548. bool mPTTDirty;
  549. };
  550. // Note: since this is a global class instance, all class members are always
  551. // available, from viewer launch to _exit(): no need for static variables to
  552. // track the shutdown (or ready) state ! HB
  553. extern LLVoiceVivox gVoiceVivox;
  554. #endif //LL_LLVOICEVIVOX_H