TeamTalk 5 .NET DLL  Version 5.14A
TeamTalk.cs
1 /*
2  * Copyright (c) 2005-2018, BearWare.dk
3  *
4  * Contact Information:
5  *
6  * Bjoern D. Rasmussen
7  * Kirketoften 5
8  * DK-8260 Viby J
9  * Denmark
10  * Email: contact@bearware.dk
11  * Phone: +45 20 20 54 59
12  * Web: http://www.bearware.dk
13  *
14  * This source code is part of the TeamTalk SDK owned by
15  * BearWare.dk. Use of this file, or its compiled unit, requires a
16  * TeamTalk SDK License Key issued by BearWare.dk.
17  *
18  * The TeamTalk SDK License Agreement along with its Terms and
19  * Conditions are outlined in the file License.txt included with the
20  * TeamTalk SDK distribution.
21  *
22  */
23 
24 using System;
25 using System.Collections.Generic;
26 using System.Text;
27 using System.Windows.Forms;
28 using System.Drawing;
29 using System.Drawing.Imaging;
30 using System.Threading;
31 using System.Diagnostics;
32 using System.Reflection;
33 using System.Runtime.InteropServices;
34 using c_tt;
35 
36 namespace BearWare
37 {
43  [Flags]
44  public enum StreamType : uint
45  {
47  STREAMTYPE_NONE = 0x00000000,
50  STREAMTYPE_VOICE = 0x00000001,
53  STREAMTYPE_VIDEOCAPTURE = 0x00000002,
56  STREAMTYPE_MEDIAFILE_AUDIO = 0x00000004,
59  STREAMTYPE_MEDIAFILE_VIDEO = 0x00000008,
62  STREAMTYPE_DESKTOP = 0x00000010,
66  STREAMTYPE_DESKTOPINPUT = 0x00000020,
78  STREAMTYPE_CHANNELMSG = 0x00000040,
85 
93  }
106  public enum SoundSystem : uint
107  {
109  SOUNDSYSTEM_NONE = 0,
111  SOUNDSYSTEM_WINMM = 1,
113  SOUNDSYSTEM_DSOUND = 2,
121  SOUNDSYSTEM_ALSA = 3,
134  SOUNDSYSTEM_WASAPI = 5,
155  }
156 
161  [Flags]
162  public enum SoundDeviceFeature : uint
163  {
164  SOUNDDEVICEFEATURE_NONE = 0x0000,
170  SOUNDDEVICEFEATURE_AEC = 0x0001,
176  SOUNDDEVICEFEATURE_AGC = 0x0002,
191  }
192 
205  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
206  public struct SoundDevice
207  {
213  public int nDeviceID;
217  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
218  public string szDeviceName;
223  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
224  public string szDeviceID;
241  public int nWaveDeviceID;
244  public bool bSupports3D;
246  public int nMaxInputChannels;
248  public int nMaxOutputChannels;
252  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_SAMPLERATES_MAX)]
253  public int[] inputSampleRates;
257  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_SAMPLERATES_MAX)]
258  public int[] outputSampleRates;
260  public int nDefaultSampleRate;
267  }
268 
269 
278  public struct SoundDeviceEffects
279  {
295  public bool bEnableAGC;
312  public bool bEnableDenoise;
329  }
330 
333  public struct SoundDeviceConstants
334  {
337  public const int TT_SOUNDDEVICE_ID_REMOTEIO = 0;
362  public const int TT_SOUNDDEVICE_ID_TEAMTALK_VIRTUAL = 1978;
363 
364 
378  public const uint TT_SOUNDDEVICE_ID_SHARED_FLAG = 0x00000800;
379 
384  public const uint TT_SOUNDDEVICE_ID_MASK = 0x000007FF;
385  }
386 
390  public struct SoundLevel
391  {
397  public const int SOUND_VU_MAX = 100;
403  public const int SOUND_VU_MIN = 0;
411  public const int SOUND_VOLUME_MAX = 32000;
419  public const int SOUND_VOLUME_DEFAULT = 1000;
425  public const int SOUND_VOLUME_MIN = 0;
434  public const int SOUND_GAIN_MAX = 32000;
444  public const int SOUND_GAIN_DEFAULT = 1000;
453  public const int SOUND_GAIN_MIN = 0;
454  }
455 
470  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
471  public struct AudioBlock
472  {
476  public int nStreamID;
478  public int nSampleRate;
480  public int nChannels;
484  public System.IntPtr lpRawAudio;
486  public int nSamples;
494  public uint uSampleIndex;
508  }
509 
518  public enum MediaFileStatus : uint
519  {
520  MFS_CLOSED = 0,
522  MFS_ERROR = 1,
524  MFS_STARTED = 2,
526  MFS_FINISHED = 3,
528  MFS_ABORTED = 4,
530  MFS_PAUSED = 5,
533  MFS_PLAYING = 6
534  }
535 
539  public enum AudioFileFormat : uint
540  {
542  AFF_NONE = 0,
555  AFF_WAVE_FORMAT = 2,
566  }
567 
575  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
576  public struct AudioFormat
577  {
581  public int nSampleRate;
583  public int nChannels;
584  }
585 
596  public enum FourCC : uint
597  {
599  FOURCC_NONE = 0,
602  FOURCC_I420 = 100,
605  FOURCC_YUY2 = 101,
608  FOURCC_RGB32 = 102
609  }
610 
617  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
618  public struct VideoFormat
619  {
622  public int nWidth;
625  public int nHeight;
629  public int nFPS_Numerator;
633  public int nFPS_Denominator;
636  }
637 
645  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
646  public struct VideoFrame
647  {
650  public int nWidth;
653  public int nHeight;
659  public int nStreamID;
664  public bool bKeyFrame;
666  public System.IntPtr frameBuffer;
669  public int nFrameBufferSize;
670  }
671 
681  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
682  public struct VideoCaptureDevice
683  {
685  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
686  public string szDeviceID;
688  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
689  public string szDeviceName;
702  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
703  public string szCaptureAPI;
705  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_VIDEOFORMATS_MAX)]
709  public int nVideoFormatsCount;
710  }
711 
719  public enum BitmapFormat : uint
720  {
722  BMP_NONE = 0,
728  BMP_RGB8_PALETTE = 1,
731  BMP_RGB16_555 = 2,
735  BMP_RGB24 = 3,
739  BMP_RGB32 = 4
740  }
741 
746  public enum DesktopProtocol : uint
747  {
751  }
752 
759  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
760  public struct DesktopWindow
761  {
763  public int nWidth;
765  public int nHeight;
770  public int nBytesPerLine;
777  public int nSessionID;
781  public IntPtr frameBuffer;
784  public int nFrameBufferSize;
785  }
786 
790  public enum DesktopKeyState : uint
791  {
793  DESKTOPKEYSTATE_NONE = 0x00000000,
795  DESKTOPKEYSTATE_DOWN = 0x00000001,
797  DESKTOPKEYSTATE_UP = 0x00000002,
798  }
799 
807  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
808  public struct DesktopInput
809  {
813  public ushort uMousePosX;
817  public ushort uMousePosY;
823  public uint uKeyCode;
828  public DesktopInput(bool set_defaults)
829  {
830  if (set_defaults)
831  {
834  uKeyState = DesktopKeyState.DESKTOPKEYSTATE_NONE;
835  }
836  else
837  {
838  uMousePosX = uMousePosY = 0;
839  uKeyCode = 0;
840  uKeyState = DesktopKeyState.DESKTOPKEYSTATE_NONE;
841  }
842  }
843  }
844 
846  public struct DesktopInputConstants
847  {
855  public const uint DESKTOPINPUT_KEYCODE_IGNORE = 0xFFFFFFFF;
856 
864  public const ushort DESKTOPINPUT_MOUSEPOS_IGNORE = 0xFFFF;
865 
872  public const uint DESKTOPINPUT_KEYCODE_LMOUSEBTN = 0x1000;
873 
880  public const uint DESKTOPINPUT_KEYCODE_RMOUSEBTN = 0x1001;
881 
888  public const uint DESKTOPINPUT_KEYCODE_MMOUSEBTN = 0x1002;
889  }
890 
903  [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
904  public struct SpeexCodec
905  {
908  [FieldOffset(0)]
909  public int nBandmode;
912  [FieldOffset(4)]
913  public int nQuality;
923  [FieldOffset(8)]
924  public int nTxIntervalMSec;
930  [FieldOffset(12)]
931  public bool bStereoPlayback;
932  }
933 
939  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
940  public struct SpeexVBRCodec
941  {
944  public int nBandmode;
947  public int nQuality;
954  public int nBitRate;
958  public int nMaxBitRate;
962  public bool bDTX;
971  public int nTxIntervalMSec;
977  public bool bStereoPlayback;
978  }
979 
981  public struct SpeexConstants
982  {
984  public const int SPEEX_BANDMODE_NARROW = 0;
986  public const int SPEEX_BANDMODE_WIDE = 1;
988  public const int SPEEX_BANDMODE_UWIDE = 2;
990  public const int SPEEX_QUALITY_MIN = 0;
992  public const int SPEEX_QUALITY_MAX = 10;
995  public const int SPEEX_NB_MIN_BITRATE = 2150;
998  public const int SPEEX_NB_MAX_BITRATE = 24600;
1001  public const int SPEEX_WB_MIN_BITRATE = 3950;
1004  public const int SPEEX_WB_MAX_BITRATE = 42200;
1007  public const int SPEEX_UWB_MIN_BITRATE = 4150;
1010  public const int SPEEX_UWB_MAX_BITRATE = 44000;
1013  public const int DEFAULT_SPEEX_BANDMODE = 1;
1016  public const int DEFAULT_SPEEX_QUALITY = 4;
1019  public const int DEFAULT_SPEEX_DELAY = 40;
1022  public const bool DEFAULT_SPEEX_SIMSTEREO = false;
1025  public const int DEFAULT_SPEEX_BITRATE = 0;
1028  public const int DEFAULT_SPEEX_MAXBITRATE = 0;
1031  public const bool DEFAULT_SPEEX_DTX = true;
1032  }
1033 
1036  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1037  public struct OpusCodec
1038  {
1041  public int nSampleRate;
1043  public int nChannels;
1047  public int nApplication;
1050  public int nComplexity;
1053  public bool bFEC;
1056  public bool bDTX;
1060  public int nBitRate;
1062  public bool bVBR;
1065  public bool bVBRConstraint;
1072  public int nTxIntervalMSec;
1076  public int nFrameSizeMSec;
1077  }
1078 
1080  public struct OpusConstants
1081  {
1084  public const int OPUS_APPLICATION_VOIP = 2048;
1087  public const int OPUS_APPLICATION_AUDIO = 2049;
1090  public const int OPUS_MIN_BITRATE = 6000;
1093  public const int OPUS_MAX_BITRATE = 510000;
1094 
1097  public const int OPUS_MIN_FRAMESIZE = 2; /* Actually it's 2.5 */
1100  public const int OPUS_MAX_FRAMESIZE = 60;
1104  public const int OPUS_REALMAX_FRAMESIZE = 120;
1105 
1107  public const int DEFAULT_OPUS_SAMPLERATE = 48000;
1108  public const int DEFAULT_OPUS_CHANNELS = 1;
1109  public const int DEFAULT_OPUS_COMPLEXITY = 10;
1110  public const bool DEFAULT_OPUS_FEC = true;
1111  public const bool DEFAULT_OPUS_DTX = false;
1112  public const bool DEFAULT_OPUS_VBR = true;
1113  public const bool DEFAULT_OPUS_VBRCONSTRAINT = false;
1114  public const int DEFAULT_OPUS_BITRATE = 32000;
1115  public const int DEFAULT_OPUS_DELAY = 20;
1116  }
1117 
1135  [StructLayout(LayoutKind.Explicit)]
1136  public struct SpeexDSP
1137  {
1145  [FieldOffset(0)]
1146  public bool bEnableAGC;
1149  [FieldOffset(4)]
1150  public int nGainLevel;
1154  [FieldOffset(8)]
1155  public int nMaxIncDBSec;
1160  [FieldOffset(12)]
1161  public int nMaxDecDBSec;
1165  [FieldOffset(16)]
1166  public int nMaxGainDB;
1169  [FieldOffset(20)]
1170  public bool bEnableDenoise;
1174  [FieldOffset(24)]
1194  [FieldOffset(28)]
1199  [FieldOffset(32)]
1200  public int nEchoSuppress;
1204  [FieldOffset(36)]
1206 
1207  public SpeexDSP(bool set_defaults)
1208  {
1209  if (set_defaults)
1210  {
1216 
1219 
1223  }
1224  else
1225  {
1226  bEnableAGC = false;
1227  nGainLevel = 0;
1228  nMaxIncDBSec = 0;
1229  nMaxDecDBSec = 0;
1230  nMaxGainDB = 0;
1231 
1232  bEnableDenoise = false;
1233  nMaxNoiseSuppressDB = 0;
1234 
1235  bEnableEchoCancellation = false;
1236  nEchoSuppress = 0;
1237  nEchoSuppressActive = 0;
1238  }
1239  }
1240  }
1241 
1244  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1245  public struct TTAudioPreprocessor
1246  {
1250  public int nGainLevel;
1252  public bool bMuteLeftSpeaker;
1254  public bool bMuteRightSpeaker;
1255  }
1256 
1266  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1268  {
1270  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1271  public struct Preamplifier
1272  {
1275  public bool bEnable;
1277  public float fFixedGainFactor;
1278  }
1280 
1283  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1284  public struct EchoCanceller
1285  {
1291  public bool bEnable;
1292  }
1294 
1297  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1298  public struct NoiseSuppression
1299  {
1301  public bool bEnable;
1304  public int nLevel;
1305  }
1307 
1309  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1310  public struct VoiceDetection
1311  {
1321  public bool bEnable;
1322  }
1324 
1327  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1328  public struct GainController2
1329  {
1332  public bool bEnable;
1335  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1336  public struct FixedDigital
1337  {
1340  public float fGainDB;
1341  }
1343 
1345  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1346  public struct AdaptiveDigital
1347  {
1348  /* @brief Enable saturation protector where saturation
1349  * margin is 2 dB. */
1350  public bool bEnable;
1351  /* Range: 0 <= x <= 100. Default: 20 dB */
1353  /* Range: 0 <= x <= 100. Default: 2 dB */
1355  /* Range: 0 < x < infinite. Default: 3 dB/sec */
1357  /* Range: -infinite < x < 0. Default: -50 */
1359  }
1361  }
1363 
1365  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1366  public struct LevelEstimation
1367  {
1373  public bool bEnable;
1374  }
1376 
1377  public WebRTCAudioPreprocessor(bool set_defaults)
1378  {
1379  if (set_defaults)
1380  {
1383 
1385 
1388 
1390 
1393 
1399 
1401  }
1402  else
1403  {
1404  preamplifier.bEnable = false;
1406 
1407  echocanceller.bEnable = false;
1408 
1409  noisesuppression.bEnable = false;
1411 
1412  voicedetection.bEnable = false;
1413 
1414  gaincontroller2.bEnable = false;
1416 
1422 
1423  levelestimation.bEnable = false;
1424  }
1425  }
1426  }
1427 
1429  public struct WebRTCConstants
1430  {
1431  public const bool DEFAULT_WEBRTC_PREAMPLIFIER_ENABLE = false;
1432  public const float DEFAULT_WEBRTC_PREAMPLIFIER_GAINFACTOR = 1.0f;
1433  public const bool DEFAULT_WEBRTC_VAD_ENABLE = false;
1434  public const bool DEFAULT_WEBRTC_LEVELESTIMATION_ENABLE = false;
1435  public const bool DEFAULT_WEBRTC_GAINCTL_ENABLE = false;
1436  public const float DEFAULT_WEBRTC_GAINDB = 15;
1437  public const bool DEFAULT_WEBRTC_SAT_PROT_ENABLE = false;
1438  public const float DEFAULT_WEBRTC_INIT_SAT_MARGIN_DB = 20;
1439  public const float DEFAULT_WEBRTC_EXTRA_SAT_MARGIN_DB = 2;
1440  public const float DEFAULT_WEBRTC_MAXGAIN_DBSEC = 3;
1441  public const float DEFAULT_WEBRTC_MAX_OUT_NOISE = -50;
1442  public const bool DEFAULT_WEBRTC_NOISESUPPRESS_ENABLE = false;
1444  public const bool DEFAULT_WEBRTC_ECHO_CANCEL_ENABLE = false;
1445  public const float WEBRTC_GAINCONTROLLER2_FIXEDGAIN_MAX = 49.9f;
1446  }
1447 
1451  public enum AudioPreprocessorType : uint
1452  {
1463  };
1464 
1466  [StructLayout(LayoutKind.Explicit)]
1467  public struct AudioPreprocessor
1468  {
1470  [FieldOffset(0)]
1473  [FieldOffset(4)]
1476  [FieldOffset(4)]
1479  [FieldOffset(4)]
1481  }
1482 
1484  public struct SpeexDSPConstants
1485  {
1486  public const bool DEFAULT_AGC_ENABLE = true;
1487  public const int DEFAULT_AGC_GAINLEVEL = 8000;
1488  public const int DEFAULT_AGC_INC_MAXDB = 12;
1489  public const int DEFAULT_AGC_DEC_MAXDB = -40;
1490  public const int DEFAULT_AGC_GAINMAXDB = 30;
1491  public const bool DEFAULT_DENOISE_ENABLE = true;
1492  public const int DEFAULT_DENOISE_SUPPRESS = -30;
1493  public const bool DEFAULT_ECHO_ENABLE = true;
1494  public const int DEFAULT_ECHO_SUPPRESS = -40;
1495  public const int DEFAULT_ECHO_SUPPRESS_ACTIVE = -15;
1496  }
1497 
1502  [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
1503  public struct WebMVP8Codec
1504  {
1506  [FieldOffset(0)]
1507  public int nRcTargetBitrate;
1513  [FieldOffset(0)]
1514  public int rc_target_bitrate;
1522  [FieldOffset(4)]
1523  public uint nEncodeDeadline;
1524  }
1525 
1527  {
1530  public const int WEBM_VPX_DL_REALTIME = 1;
1533  public const int WEBM_VPX_DL_GOOD_QUALITY = 1000000;
1536  public const int WEBM_VPX_DL_BEST_QUALITY = 0;
1537  }
1538 
1543  public enum Codec : uint
1544  {
1546  NO_CODEC = 0,
1549  SPEEX_CODEC = 1,
1552  SPEEX_VBR_CODEC = 2,
1554  OPUS_CODEC = 3,
1556  WEBM_VP8_CODEC = 128
1557  }
1558 
1562  [StructLayout(LayoutKind.Explicit)]
1563  public struct AudioCodec
1564  {
1567  [FieldOffset(0)]
1568  public Codec nCodec;
1571  [FieldOffset(4)]
1575  [FieldOffset(4)]
1579  [FieldOffset(4)]
1580  public OpusCodec opus;
1581  }
1582 
1596  [StructLayout(LayoutKind.Explicit)]
1597  public struct AudioConfig
1598  {
1600  [FieldOffset(0)]
1601  public bool bEnableAGC;
1603  [FieldOffset(4)]
1604  public int nGainLevel;
1605 
1606  public AudioConfig(bool set_defaults)
1607  {
1608  if (set_defaults)
1609  {
1610  bEnableAGC = true;
1612  }
1613  else
1614  {
1615  bEnableAGC = false;
1616  nGainLevel = 0;
1617  }
1618  }
1619  }
1620 
1621  public struct AudioConfigConstants
1622  {
1623  public const int DEFAULT_AGC_GAINLEVEL = 8000;
1624  public const int DEFAULT_AGC_INC_MAXDB = 12;
1625  }
1626 
1628  [StructLayout(LayoutKind.Explicit)]
1629  public struct VideoCodec
1630  {
1634  [FieldOffset(0)]
1635  public Codec nCodec;
1636  [FieldOffset(4)]
1638  }
1649  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1650  public struct MediaFileInfo
1651  {
1656  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1657  public string szFileName;
1663  public uint uDurationMSec;
1665  public uint uElapsedMSec;
1666  }
1675  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1676  public struct MediaFilePlayback
1677  {
1682  public uint uOffsetMSec;
1684  public bool bPaused;
1687  }
1688 
1691  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1692  public struct AudioInputProgress
1693  {
1695  public int nStreamID;
1698  public uint uQueueMSec;
1701  public uint uElapsedMSec;
1702  }
1703 
1720  [Flags]
1721  public enum UserRight : uint
1722  {
1725  USERRIGHT_NONE = 0x00000000,
1728  USERRIGHT_MULTI_LOGIN = 0x00000001,
1730  USERRIGHT_VIEW_ALL_USERS = 0x00000002,
1738  USERRIGHT_MODIFY_CHANNELS = 0x00000008,
1741  USERRIGHT_TEXTMESSAGE_BROADCAST = 0x00000010,
1743  USERRIGHT_KICK_USERS = 0x00000020,
1746  USERRIGHT_BAN_USERS = 0x00000040,
1749  USERRIGHT_MOVE_USERS = 0x00000080,
1752  USERRIGHT_OPERATOR_ENABLE = 0x00000100,
1754  USERRIGHT_UPLOAD_FILES = 0x00000200,
1757  USERRIGHT_DOWNLOAD_FILES = 0x00000400,
1760  USERRIGHT_UPDATE_SERVERPROPERTIES = 0x00000800,
1763  USERRIGHT_TRANSMIT_VOICE = 0x00001000,
1766  USERRIGHT_TRANSMIT_VIDEOCAPTURE = 0x00002000,
1769  USERRIGHT_TRANSMIT_DESKTOP = 0x00004000,
1772  USERRIGHT_TRANSMIT_DESKTOPINPUT = 0x00008000,
1788  USERRIGHT_LOCKED_NICKNAME = 0x00040000,
1791  USERRIGHT_LOCKED_STATUS = 0x00080000,
1794  USERRIGHT_RECORD_VOICE = 0x00100000,
1796  USERRIGHT_VIEW_HIDDEN_CHANNELS = 0x00200000,
1799  }
1800 
1807  [Flags]
1808  public enum ServerLogEvent : uint
1809  {
1811  SERVERLOGEVENT_NONE = 0x00000000,
1813  SERVERLOGEVENT_USER_CONNECTED = 0x00000001,
1815  SERVERLOGEVENT_USER_DISCONNECTED = 0x00000002,
1817  SERVERLOGEVENT_USER_LOGGEDIN = 0x00000004,
1819  SERVERLOGEVENT_USER_LOGGEDOUT = 0x00000008,
1821  SERVERLOGEVENT_USER_LOGINFAILED = 0x00000010,
1823  SERVERLOGEVENT_USER_TIMEDOUT = 0x00000020,
1825  SERVERLOGEVENT_USER_KICKED = 0x00000040,
1827  SERVERLOGEVENT_USER_BANNED = 0x00000080,
1829  SERVERLOGEVENT_USER_UNBANNED = 0x00000100,
1831  SERVERLOGEVENT_USER_UPDATED = 0x00000200,
1833  SERVERLOGEVENT_USER_JOINEDCHANNEL = 0x00000400,
1835  SERVERLOGEVENT_USER_LEFTCHANNEL = 0x00000800,
1837  SERVERLOGEVENT_USER_MOVED = 0x00001000,
1847  SERVERLOGEVENT_CHANNEL_CREATED = 0x00020000,
1849  SERVERLOGEVENT_CHANNEL_UPDATED = 0x00040000,
1851  SERVERLOGEVENT_CHANNEL_REMOVED = 0x00080000,
1853  SERVERLOGEVENT_FILE_UPLOADED = 0x00100000,
1855  SERVERLOGEVENT_FILE_DOWNLOADED = 0x00200000,
1857  SERVERLOGEVENT_FILE_DELETED = 0x00400000,
1859  SERVERLOGEVENT_SERVER_UPDATED = 0x00800000,
1861  SERVERLOGEVENT_SERVER_SAVECONFIG = 0x01000000,
1862  }
1863 
1875  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1876  public struct ServerProperties
1877  {
1879  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1880  public string szServerName;
1883  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1884  public string szMOTD;
1893  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1894  public string szMOTDRaw;
1897  public int nMaxUsers;
1900  public int nMaxLoginAttempts;
1926  public bool bAutoSave;
1928  public int nTcpPort;
1930  public int nUdpPort;
1933  public int nUserTimeout;
1935  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1936  public string szServerVersion;
1938  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1948  public int nLoginDelayMSec;
1952  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1953  public string szAccessToken;
1960  }
1961 
1969  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1970  public struct ServerStatistics
1971  {
1974  public long nTotalBytesTX;
1977  public long nTotalBytesRX;
1980  public long nVoiceBytesTX;
1983  public long nVoiceBytesRX;
1992  public long nMediaFileBytesTX;
1995  public long nMediaFileBytesRX;
1998  public long nDesktopBytesTX;
2001  public long nDesktopBytesRX;
2003  public int nUsersServed;
2005  public int nUsersPeak;
2008  public long nFilesTx;
2011  public long nFilesRx;
2013  public long nUptimeMSec;
2014  }
2015 
2021  [Flags]
2022  public enum BanType : uint
2023  {
2025  BANTYPE_NONE = 0x00,
2029  BANTYPE_CHANNEL = 0x01,
2031  BANTYPE_IPADDR = 0x02,
2033  BANTYPE_USERNAME = 0x04
2034  };
2035 
2040  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2041  public struct BannedUser
2042  {
2044  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2045  public string szIPAddress;
2047  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2048  public string szChannelPath;
2050  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2051  public string szBanTime;
2053  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2054  public string szNickname;
2056  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2057  public string szUsername;
2060  }
2061 
2065  [Flags]
2066  public enum UserType : uint
2067  {
2070  USERTYPE_NONE = 0x0,
2072  USERTYPE_DEFAULT = 0x01,
2074  USERTYPE_ADMIN = 0x02
2075  }
2076 
2085  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2086  public struct AbusePrevention
2087  {
2097  public int nCommandsLimit;
2100  }
2101 
2110  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2111  public struct UserAccount
2112  {
2114  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2115  public string szUsername;
2117  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2118  public string szPassword;
2128  public int nUserData;
2130  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2131  public string szNote;
2136  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2137  public string szInitChannel;
2141  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_CHANNELS_OPERATOR_MAX)]
2142  public int[] autoOperatorChannels;
2154  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2155  public string szLastModified;
2156  }
2180  [Flags]
2181  public enum Subscription : uint
2182  {
2184  SUBSCRIBE_NONE = 0x00000000,
2187  SUBSCRIBE_USER_MSG = 0x00000001,
2190  SUBSCRIBE_CHANNEL_MSG = 0x00000002,
2193  SUBSCRIBE_BROADCAST_MSG = 0x00000004,
2196  SUBSCRIBE_CUSTOM_MSG = 0x00000008,
2198  SUBSCRIBE_VOICE = 0x00000010,
2200  SUBSCRIBE_VIDEOCAPTURE = 0x00000020,
2202  SUBSCRIBE_DESKTOP = 0x00000040,
2206  SUBSCRIBE_DESKTOPINPUT = 0x00000080,
2209  SUBSCRIBE_MEDIAFILE = 0x00000100,
2212  SUBSCRIBE_INTERCEPT_USER_MSG = 0x00010000,
2215  SUBSCRIBE_INTERCEPT_CHANNEL_MSG = 0x00020000,
2216  /* unused SUBSCRIBE_INTERCEPT_BROADCAST_MSG = 0x00040000 */
2219  SUBSCRIBE_INTERCEPT_CUSTOM_MSG = 0x00080000,
2224  SUBSCRIBE_INTERCEPT_VOICE = 0x00100000,
2229  SUBSCRIBE_INTERCEPT_VIDEOCAPTURE = 0x00200000,
2234  SUBSCRIBE_INTERCEPT_DESKTOP = 0x00400000,
2235  /* unused SUBSCRIBE_INTERCEPT_DESKTOPINPUT = 0x00800000, */
2240  SUBSCRIBE_INTERCEPT_MEDIAFILE = 0x01000000,
2241  }
2242 
2246  [Flags]
2247  public enum UserState : uint
2248  {
2250  USERSTATE_NONE = 0x0000000,
2254  USERSTATE_VOICE = 0x00000001,
2256  USERSTATE_MUTE_VOICE = 0x00000002,
2259  USERSTATE_MUTE_MEDIAFILE = 0x00000004,
2264  USERSTATE_DESKTOP = 0x00000008,
2269  USERSTATE_VIDEOCAPTURE = 0x00000010,
2275  USERSTATE_MEDIAFILE_AUDIO = 0x00000020,
2279  USERSTATE_MEDIAFILE_VIDEO = 0x00000040,
2285  }
2286 
2291  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2292  public struct User
2293  {
2297  public int nUserID;
2302  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2303  public string szUsername;
2308  public int nUserData;
2314  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2315  public string szIPAddress;
2321  public uint uVersion;
2327  public int nChannelID;
2344  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2345  public string szNickname;
2350  public int nStatusMode;
2355  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2356  public string szStatusMsg;
2362  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2363  public string szMediaStorageDir;
2369  public int nVolumeVoice;
2375  public int nVolumeMediaFile;
2388  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
2389  public float[] soundPositionVoice;
2394  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
2395  public float[] soundPositionMediaFile;
2400  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
2401  public bool[] stereoPlaybackVoice;
2406  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
2411  public int nBufferMSecVoice;
2423  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2424  public string szClientName;
2425  }
2426 
2431  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2432  public struct UserStatistics
2433  {
2435  public long nVoicePacketsRecv;
2437  public long nVoicePacketsLost;
2464  }
2465 
2474  public enum TextMsgType : uint
2475  {
2478  MSGTYPE_USER = 1,
2483  MSGTYPE_CHANNEL = 2,
2486  MSGTYPE_BROADCAST = 3,
2489  MSGTYPE_CUSTOM = 4
2490  }
2491 
2499  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2500  public struct TextMessage
2501  {
2505  public int nFromUserID;
2507  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2508  public string szFromUsername;
2510  public int nToUserID;
2513  public int nChannelID;
2516  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2517  public string szMessage;
2520  public bool bMore;
2521  }
2529  [Flags]
2530  public enum ChannelType : uint
2531  {
2534  CHANNEL_DEFAULT = 0x0000,
2537  CHANNEL_PERMANENT = 0x0001,
2539  CHANNEL_SOLO_TRANSMIT = 0x0002,
2550  CHANNEL_CLASSROOM = 0x0004,
2555  CHANNEL_OPERATOR_RECVONLY = 0x0008,
2558  CHANNEL_NO_VOICEACTIVATION = 0x0010,
2560  CHANNEL_NO_RECORDING = 0x0020,
2563  CHANNEL_HIDDEN = 0x0040,
2564  }
2565 
2577  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2578  public struct Channel
2579  {
2582  public int nParentID;
2585  public int nChannelID;
2587  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2588  public string szName;
2590  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2591  public string szTopic;
2595  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2596  public string szPassword;
2599  public bool bPassword;
2605  public int nUserData;
2607  public long nDiskQuota;
2610  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2611  public string szOpPassword;
2613  public int nMaxUsers;
2674  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_TRANSMITUSERS_MAX * 2)]
2675  public int[] transmitUsers;
2680  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_TRANSMITQUEUE_MAX)]
2681  public int[] transmitUsersQueue;
2682 
2691 
2696 
2701 
2704  public void AddTransmitUser(int nUserID, StreamType uStreamType)
2705  {
2706  int i;
2707  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2708  {
2709  if (transmitUsers[i * 2] == 0 || transmitUsers[i * 2] == nUserID)
2710  break;
2711  }
2713  {
2714  transmitUsers[i * 2] = nUserID;
2715  transmitUsers[i * 2 + 1] |= (int)uStreamType;
2716  }
2717  }
2721  {
2722  int i;
2723  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2724  {
2725  if (transmitUsers[i * 2] == nUserID)
2726  return (StreamType)transmitUsers[i * 2 + 1];
2727  }
2728  return StreamType.STREAMTYPE_NONE;
2729  }
2732  {
2733  int i;
2734  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2735  {
2736  if (transmitUsers[i * 2] == 0)
2737  break;
2738  }
2739  return i;
2740  }
2742  public void RemoveTransmitUser(int nUserID, StreamType uStreamType)
2743  {
2744  int i;
2745  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2746  {
2747  if (transmitUsers[i * 2] == nUserID)
2748  break;
2749  }
2751  {
2752  transmitUsers[i * 2] = nUserID;
2753  transmitUsers[i * 2 + 1] &= (int)~uStreamType;
2754 
2755  if (transmitUsers[i * 2 + 1] == (int)StreamType.STREAMTYPE_NONE)
2756  {
2757  for (; i < TeamTalkBase.TT_TRANSMITUSERS_MAX - 1; i++)
2758  {
2759  transmitUsers[i * 2] = transmitUsers[(i + 1) * 2 + 1];
2760  transmitUsers[i * 2 + 1] = transmitUsers[(i + 1) * 2 + 1];
2761  }
2762  }
2763  }
2764  }
2765  }
2766 
2769  public enum FileTransferStatus : uint
2770  {
2772  FILETRANSFER_CLOSED = 0,
2774  FILETRANSFER_ERROR = 1,
2776  FILETRANSFER_ACTIVE = 2,
2779  }
2780 
2784  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2785  public struct FileTransfer
2786  {
2790  public int nTransferID;
2792  public int nChannelID;
2794  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2795  public string szLocalFilePath;
2797  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2798  public string szRemoteFileName;
2800  public long nFileSize;
2802  public long nTransferred;
2804  public bool bInbound;
2805  }
2806 
2810  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2811  public struct RemoteFile
2812  {
2814  public int nChannelID;
2816  public int nFileID;
2818  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2819  public string szFileName;
2821  public long nFileSize;
2823  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2824  public string szUsername;
2827  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2828  public string szUploadTime;
2829  }
2840  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2841  public struct EncryptionContext
2842  {
2848  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2849  public string szCertificateFile;
2851  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2852  public string szPrivateKeyFile;
2857  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2858  public string szCAFile;
2861  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2862  public string szCADir;
2869  public bool bVerifyPeer;
2880  public bool bVerifyClientOnce;
2888  public int nVerifyDepth;
2889  }
2890 
2898  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2899  public struct ClientKeepAlive
2900  {
2943  }
2944 
2949  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2950  public struct ClientStatistics
2951  {
2953  public long nUdpBytesSent;
2955  public long nUdpBytesRecv;
2957  public long nVoiceBytesSent;
2959  public long nVoiceBytesRecv;
2973  public long nDesktopBytesSent;
2975  public long nDesktopBytesRecv;
2979  public int nUdpPingTimeMs;
2983  public int nTcpPingTimeMs;
3002  }
3003 
3009  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
3010  public struct JitterConfig
3011  {
3013  public int nFixedDelayMSec;
3015  public bool bUseAdativeDejitter;
3026  }
3027 
3028 
3038  public enum ClientError : uint
3039  {
3041  CMDERR_SUCCESS = 0,
3042  SUCCESS = 0,
3043 
3044  /* COMMAND ERRORS 1000-1999 ARE DUE TO INVALID OR UNSUPPORTED
3045  * COMMANDS */
3046 
3048  CMDERR_SYNTAX_ERROR = 1000,
3053  CMDERR_UNKNOWN_COMMAND = 1001,
3056  CMDERR_MISSING_PARAMETER = 1002,
3067  CMDERR_INVALID_USERNAME = 1005,
3068 
3069  /* COMMAND ERRORS 2000-2999 ARE DUE TO INSUFFICIENT RIGHTS */
3070 
3087  CMDERR_INVALID_ACCOUNT = 2002,
3104  CMDERR_SERVER_BANNED = 2005,
3136  CMDERR_NOT_AUTHORIZED = 2006,
3144 
3151 
3158 
3165 
3169 
3174  CMDERR_COMMAND_FLOOD = 2014,
3175 
3181  CMDERR_CHANNEL_BANNED = 2015,
3182 
3183  /* COMMAND ERRORS 3000-3999 ARE DUE TO INVALID STATE OF CLIENT INSTANCE */
3184 
3190  CMDERR_NOT_LOGGEDIN = 3000,
3191 
3195  CMDERR_ALREADY_LOGGEDIN = 3001,
3199  CMDERR_NOT_IN_CHANNEL = 3002,
3226  CMDERR_CHANNEL_NOT_FOUND = 3005,
3237  CMDERR_USER_NOT_FOUND = 3006,
3242  CMDERR_BAN_NOT_FOUND = 3007,
3252  CMDERR_OPENFILE_FAILED = 3009,
3257  CMDERR_ACCOUNT_NOT_FOUND = 3010,
3262  CMDERR_FILE_NOT_FOUND = 3011,
3273 
3277  CMDERR_CHANNEL_HAS_USERS = 3015,
3278 
3283 
3289 
3290  /* ERRORS 10000-10999 ARE NOT COMMAND ERRORS BUT INSTEAD
3291  * ERRORS IN THE CLIENT INSTANCE. */
3292 
3297  INTERR_SNDINPUT_FAILURE = 10000,
3302  INTERR_SNDOUTPUT_FAILURE = 10001,
3331  INTERR_SNDEFFECT_FAILURE = 10005,
3332  }
3333 
3334  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
3335  public struct ClientErrorMsg
3336  {
3338  public int nErrorNo;
3340  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
3341  public string szErrorMsg;
3342  }
3343 
3353  public enum ClientEvent : uint
3354  {
3355  CLIENTEVENT_NONE = 0,
3907  }
3908 
3909 
3910  /* List of structures used internally by TeamTalkBase. */
3911  public enum TTType : uint
3912  {
3913  __NONE = 0,
3914  __AUDIOCODEC = 1,
3915  __BANNEDUSER = 2,
3916  __VIDEOFORMAT = 3,
3917  __OPUSCODEC = 4,
3918  __CHANNEL = 5,
3919  __CLIENTSTATISTICS = 6,
3920  __REMOTEFILE = 7,
3921  __FILETRANSFER = 8,
3922  __MEDIAFILESTATUS = 9,
3923  __SERVERPROPERTIES = 10,
3924  __SERVERSTATISTICS = 11,
3925  __SOUNDDEVICE = 12,
3926  __SPEEXCODEC = 13,
3927  __TEXTMESSAGE = 14,
3928  __WEBMVP8CODEC = 15,
3929  __TTMESSAGE = 16,
3930  __USER = 17,
3931  __USERACCOUNT = 18,
3932  __USERSTATISTICS = 19,
3933  __VIDEOCAPTUREDEVICE = 20,
3934  __VIDEOCODEC = 21,
3935  __AUDIOCONFIG = 22,
3936  __SPEEXVBRCODEC = 23,
3937  __VIDEOFRAME = 24,
3938  __AUDIOBLOCK = 25,
3939  __AUDIOFORMAT = 26,
3940  __MEDIAFILEINFO = 27,
3941  __CLIENTERRORMSG = 28,
3942  __TTBOOL = 29,
3943  __INT32 = 30,
3944  __DESKTOPINPUT = 31,
3945  __SPEEXDSP = 32,
3946  __STREAMTYPE = 33,
3948  __AUDIOPREPROCESSOR = 35,
3949  __TTAUDIOPREPROCESSOR = 36,
3950  __MEDIAFILEPLAYBACK = 37,
3951  __CLIENTKEEPALIVE = 38,
3952  __UINT32 = 39,
3953  __AUDIOINPUTPROGRESS = 40,
3954  __JITTERCONFIG = 41,
3956  __ENCRYPTIONCONTEXT = 43,
3957  }
3958 
3969  [StructLayout(LayoutKind.Sequential)]
3970  public struct TTMessage
3971  {
3975  public int nSource;
3977  public TTType ttType;
3979  public uint uReserved;
3980  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TTDLL.SIZEOF_TTMESSAGE_DATA)]
3981  public byte[] data;
3982  //UnionData data;
3983 
3984  public object DataToObject()
3985  {
3986  switch (ttType)
3987  {
3988  case TTType.__CHANNEL:
3989  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(Channel));
3990  case TTType.__CLIENTERRORMSG:
3991  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ClientErrorMsg));
3992  case TTType.__DESKTOPINPUT:
3993  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(DesktopInput));
3994  case TTType.__FILETRANSFER:
3995  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(FileTransfer));
3996  case TTType.__MEDIAFILEINFO:
3997  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(MediaFileInfo));
3998  case TTType.__REMOTEFILE:
3999  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(RemoteFile));
4000  case TTType.__SERVERPROPERTIES:
4001  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ServerProperties));
4002  case TTType.__SERVERSTATISTICS:
4003  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ServerStatistics));
4004  case TTType.__TEXTMESSAGE:
4005  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(TextMessage));
4006  case TTType.__USER:
4007  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(User));
4008  case TTType.__USERACCOUNT:
4009  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(UserAccount));
4010  case TTType.__BANNEDUSER :
4011  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(BannedUser));
4012  case TTType.__TTBOOL:
4013  return Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this)) != 0;
4014  case TTType.__INT32:
4015  return Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this));
4016  case TTType.__STREAMTYPE :
4017  return (StreamType)Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this));
4018  case TTType.__AUDIOINPUTPROGRESS :
4019  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(AudioInputProgress));
4020  default:
4021  return null;
4022  }
4023  }
4024  }
4025 
4026  [StructLayout(LayoutKind.Explicit, Size = 5224)]
4027  struct UnionData
4028  {
4029  [FieldOffset(0)]
4031  [FieldOffset(0)]
4033  [FieldOffset(0)]
4035  [FieldOffset(0)]
4037  [FieldOffset(0)]
4039  [FieldOffset(0)]
4041  [FieldOffset(0)]
4043  [FieldOffset(0)]
4045  [FieldOffset(0)]
4046  public User user;
4047  [FieldOffset(0)]
4049  [FieldOffset(0)]
4050  public bool bActive;
4051  [FieldOffset(0)]
4052  public int nBytesRemain;
4053  [FieldOffset(0)]
4054  public int nStreamID;
4055  [FieldOffset(0)]
4056  public int nPayloadSize;
4057  }
4058 
4076  [Flags]
4077  public enum ClientFlag : uint
4078  {
4081  CLIENT_CLOSED = 0x00000000,
4085  CLIENT_SNDINPUT_READY = 0x00000001,
4089  CLIENT_SNDOUTPUT_READY = 0x00000002,
4095  CLIENT_SNDINOUTPUT_DUPLEX = 0x00000004,
4102  CLIENT_SNDINPUT_VOICEACTIVATED = 0x00000008,
4109  CLIENT_SNDINPUT_VOICEACTIVE = 0x00000010,
4112  CLIENT_SNDOUTPUT_MUTE = 0x00000020,
4118  CLIENT_SNDOUTPUT_AUTO3DPOSITION = 0x00000040,
4122  CLIENT_VIDEOCAPTURE_READY = 0x00000080,
4125  CLIENT_TX_VOICE = 0x00000100,
4128  CLIENT_TX_VIDEOCAPTURE = 0x00000200,
4134  CLIENT_TX_DESKTOP = 0x00000400,
4139  CLIENT_DESKTOP_ACTIVE = 0x00000800,
4143  CLIENT_MUX_AUDIOFILE = 0x00001000,
4146  CLIENT_CONNECTING = 0x00002000,
4151  CLIENT_CONNECTED = 0x00004000,
4158  CLIENT_AUTHORIZED = 0x00008000,
4163  CLIENT_STREAM_AUDIO = 0x00010000,
4168  CLIENT_STREAM_VIDEO = 0x00020000
4169  }
4170 
4178  public abstract class TeamTalkBase : IDisposable
4179  {
4188  public const int TT_STRLEN = 512;
4189 
4191  public const int TT_USERID_MAX = 0xFFF;
4192 
4195  public const int TT_CHANNELID_MAX = 0xFFF;
4196 
4200  public const int TT_VIDEOFORMATS_MAX = 1024;
4201 
4207  public const int TT_TRANSMITUSERS_MAX = 128;
4208 
4216  public const int TT_CLASSROOM_FREEFORALL = 0xFFF;
4217 
4220  public const int TT_CLASSROOM_USERID_INDEX = 0;
4221 
4224  public const int TT_CLASSROOM_STREAMTYPE_INDEX = 1;
4225 
4228  public const int TT_TRANSMITUSERS_FREEFORALL = 0xFFF;
4229 
4232  public const int TT_TRANSMITUSERS_USERID_INDEX = 0;
4233 
4237 
4251  public const int TT_LOCAL_USERID = 0;
4252 
4260  public const int TT_LOCAL_TX_USERID = 0x1002;
4261 
4269  public const int TT_MUXED_USERID = 0x1001; /* TT_USERID_MAX + 2 */
4270 
4275  public const int TT_CHANNELS_OPERATOR_MAX = 16;
4276 
4280  public const int TT_TRANSMITQUEUE_MAX = 16;
4281 
4284  public const int TT_SAMPLERATES_MAX = 16;
4285 
4290  public const int TT_DESKTOPINPUT_MAX = 16;
4291 
4300  public const uint TT_MEDIAPLAYBACK_OFFSET_IGNORE = 0xFFFFFFFF;
4301 
4302 
4304  public static string GetVersion() { return Marshal.PtrToStringAuto(TTDLL.TT_GetVersion()); }
4305 
4316  protected TeamTalkBase(bool poll_based)
4317  {
4318  Assembly assembly = Assembly.GetExecutingAssembly();
4319  AssemblyName name = assembly.GetName();
4320  Version dllversion = new Version(Marshal.PtrToStringUni((c_tt.TTDLL.TT_GetVersion())));
4321  if (!name.Version.Equals(dllversion))
4322  {
4323  string errmsg = String.Format("Invalid {2} version loaded. {2} is version {0} and {3} is version {1}",
4324  dllversion.ToString(), name.Version.ToString(), c_tt.TTDLL.dllname, c_tt.TTDLL.mgtdllname);
4325 
4326  // throw new Exception(errmsg);
4327 
4328  System.Diagnostics.Debug.WriteLine(errmsg);
4329  }
4330 
4331  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOCODEC) == Marshal.SizeOf(new AudioCodec()));
4332  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__BANNEDUSER) == Marshal.SizeOf(new BannedUser()));
4333  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOFORMAT) == Marshal.SizeOf(new VideoFormat()));
4334  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__OPUSCODEC) == Marshal.SizeOf(new OpusCodec()));
4335  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CHANNEL) == Marshal.SizeOf(new Channel()));
4336  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTSTATISTICS) == Marshal.SizeOf(new ClientStatistics()));
4337  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__REMOTEFILE) == Marshal.SizeOf(new RemoteFile()));
4338  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__FILETRANSFER) == Marshal.SizeOf(new FileTransfer()));
4339  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILESTATUS) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(MediaFileStatus))));
4340  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SERVERPROPERTIES) == Marshal.SizeOf(new ServerProperties()));
4341  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SERVERSTATISTICS) == Marshal.SizeOf(new ServerStatistics()));
4342  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SOUNDDEVICE) == Marshal.SizeOf(new SoundDevice()));
4343  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXCODEC) == Marshal.SizeOf(new SpeexCodec()));
4344  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TEXTMESSAGE) == Marshal.SizeOf(new TextMessage()));
4345  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__WEBMVP8CODEC) == Marshal.SizeOf(new WebMVP8Codec()));
4346  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TTMESSAGE) == Marshal.SizeOf(new TTMessage()));
4347  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USER) == Marshal.SizeOf(new User()));
4348  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USERACCOUNT) == Marshal.SizeOf(new UserAccount()));
4349  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USERSTATISTICS) == Marshal.SizeOf(new UserStatistics()));
4350  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOCAPTUREDEVICE) == Marshal.SizeOf(new VideoCaptureDevice()));
4351  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOCODEC) == Marshal.SizeOf(new VideoCodec()));
4352  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOCONFIG) == Marshal.SizeOf(new AudioConfig()));
4353  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXVBRCODEC) == Marshal.SizeOf(new SpeexVBRCodec()));
4354  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOFRAME) == Marshal.SizeOf(new VideoFrame()));
4355  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOBLOCK) == Marshal.SizeOf(new AudioBlock()));
4356  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOFORMAT) == Marshal.SizeOf(new AudioFormat()));
4357  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILEINFO) == Marshal.SizeOf(new MediaFileInfo()));
4358  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTERRORMSG) == Marshal.SizeOf(new ClientErrorMsg()));
4359  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__DESKTOPINPUT) == Marshal.SizeOf(new DesktopInput()));
4360  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXDSP) == Marshal.SizeOf(new SpeexDSP()));
4361  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__STREAMTYPE) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(StreamType))));
4362  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOPREPROCESSORTYPE) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(AudioPreprocessorType))));
4363  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__WEBRTCAUDIOPREPROCESSOR) == Marshal.SizeOf(new WebRTCAudioPreprocessor()));
4364  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TTAUDIOPREPROCESSOR) == Marshal.SizeOf(new TTAudioPreprocessor()));
4365  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOPREPROCESSOR) == Marshal.SizeOf(new AudioPreprocessor()));
4366  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILEPLAYBACK) == Marshal.SizeOf(new MediaFilePlayback()));
4367  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTKEEPALIVE) == Marshal.SizeOf(new ClientKeepAlive()));
4368  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOINPUTPROGRESS) == Marshal.SizeOf(new AudioInputProgress()));
4369  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__JITTERCONFIG) == Marshal.SizeOf(new JitterConfig()));
4370  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__ENCRYPTIONCONTEXT) == Marshal.SizeOf(new EncryptionContext()));
4371 
4372  if (poll_based)
4373  m_ttInst = TTDLL.TT_InitTeamTalkPoll();
4374  else
4375  {
4376  m_eventhandler = new MyEventHandler(this);
4377 #if PocketPC
4378  IntPtr hWnd = m_eventhandler.Hwnd;
4379 #else
4380  m_eventhandler.CreateControl();
4381  IntPtr hWnd = m_eventhandler.Handle;
4382 #endif
4383  m_ttInst = TTDLL.TT_InitTeamTalk(hWnd, MyEventHandler.WM_TEAMTALK_CLIENTEVENT);
4384  }
4385  }
4386 
4391  ~TeamTalkBase()
4392  {
4393  DeleteMe();
4394  }
4395 
4396 
4397  #region IDisposable Members
4398 
4399  public void Dispose()
4400  {
4401  DeleteMe();
4402  }
4403 
4404  private void DeleteMe()
4405  {
4406  if (m_ttInst != IntPtr.Zero)
4407  {
4408  TTDLL.TT_CloseTeamTalk(m_ttInst);
4409  m_ttInst = IntPtr.Zero;
4410  }
4411  }
4412 
4413  #endregion
4414 
4432  public bool GetMessage(ref TTMessage pMsg, int nWaitMs)
4433  {
4434  return TTDLL.TT_GetMessage(m_ttInst, ref pMsg, ref nWaitMs);
4435  }
4436 
4463  public bool PumpMessage(ClientEvent nClientEvent,
4464  int nIdentifier)
4465  {
4466  return TTDLL.TT_PumpMessage(m_ttInst, nClientEvent, nIdentifier);
4467  }
4468 
4477  public BearWare.ClientFlag GetFlags()
4478  {
4479  return TTDLL.TT_GetFlags(m_ttInst);
4480  }
4481 
4486  {
4487  get { return GetFlags(); }
4488  }
4489 
4499  public static bool SetLicenseInformation(string szRegName, string szRegKey)
4500  {
4501  return TTDLL.TT_SetLicenseInformation(szRegName, szRegKey);
4502  }
4503 
4508  public void ProcessMsg(TTMessage msg)
4509  {
4510  switch (msg.nClientEvent)
4511  {
4512  case ClientEvent.CLIENTEVENT_CON_SUCCESS:
4513  if(OnConnectionSuccess != null)
4515  break;
4516  case ClientEvent.CLIENTEVENT_CON_FAILED:
4517  if (OnConnectionFailed != null)
4519  break;
4520  case ClientEvent.CLIENTEVENT_CON_LOST:
4521  if (OnConnectionLost != null)
4522  OnConnectionLost();
4523  break;
4524  case ClientEvent.CLIENTEVENT_CON_MAX_PAYLOAD_UPDATED :
4525  if (OnConnectionMaxPayloadUpdated != null)
4527  break;
4528  case ClientEvent.CLIENTEVENT_CMD_PROCESSING:
4529  if (OnCmdProcessing != null)
4530  OnCmdProcessing(msg.nSource, (bool)msg.DataToObject());
4531  break;
4532  case ClientEvent.CLIENTEVENT_CMD_ERROR:
4533  if (OnCmdError != null)
4534  OnCmdError((int)msg.nSource, (ClientErrorMsg)msg.DataToObject());
4535  break;
4536  case ClientEvent.CLIENTEVENT_CMD_SUCCESS :
4537  if (OnCmdSuccess != null)
4538  OnCmdSuccess((int)msg.nSource);
4539  break;
4540  case ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGGEDIN:
4541  if (OnCmdMyselfLoggedIn != null)
4543  break;
4544  case ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGGEDOUT:
4545  if (OnCmdMyselfLoggedOut != null)
4547  break;
4548  case ClientEvent.CLIENTEVENT_CMD_MYSELF_KICKED:
4549  if (msg.ttType == TTType.__USER)
4550  {
4551  if (OnCmdMyselfKicked != null)
4553  }
4554  else if (OnCmdMyselfKicked != null)
4555  OnCmdMyselfKicked(new User());
4556  break;
4557  case ClientEvent.CLIENTEVENT_CMD_USER_LOGGEDIN:
4558  if (OnCmdUserLoggedIn != null)
4560  break;
4561  case ClientEvent.CLIENTEVENT_CMD_USER_LOGGEDOUT:
4562  if (OnCmdUserLoggedOut != null)
4564  break;
4565  case ClientEvent.CLIENTEVENT_CMD_USER_UPDATE:
4566  if (OnCmdUserUpdate != null)
4568  break;
4569  case ClientEvent.CLIENTEVENT_CMD_USER_JOINED:
4570  if (OnCmdUserJoinedChannel != null)
4572  break;
4573  case ClientEvent.CLIENTEVENT_CMD_USER_LEFT:
4574  if (OnCmdUserLeftChannel != null)
4576  break;
4577  case ClientEvent.CLIENTEVENT_CMD_USER_TEXTMSG:
4578  if (OnCmdUserTextMessage != null)
4580  break;
4581  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_NEW:
4582  if (OnCmdChannelNew != null)
4584  break;
4585  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_UPDATE:
4586  if (OnCmdChannelUpdate != null)
4588  break;
4589  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_REMOVE:
4590  if (OnCmdChannelRemove != null)
4592  break;
4593  case ClientEvent.CLIENTEVENT_CMD_SERVER_UPDATE:
4594  if (OnCmdServerUpdate != null)
4596  break;
4597  case ClientEvent.CLIENTEVENT_CMD_SERVERSTATISTICS :
4598  if (OnCmdServerStatistics != null)
4600  break;
4601  case ClientEvent.CLIENTEVENT_CMD_FILE_NEW:
4602  if (OnCmdFileNew != null)
4604  break;
4605  case ClientEvent.CLIENTEVENT_CMD_FILE_REMOVE:
4606  if (OnCmdFileRemove != null)
4608  break;
4609  case ClientEvent.CLIENTEVENT_CMD_USERACCOUNT :
4610  if (OnCmdUserAccount != null)
4612  break;
4613  case ClientEvent.CLIENTEVENT_CMD_BANNEDUSER :
4614  if (OnCmdBannedUser != null)
4616  break;
4617 
4618  case ClientEvent.CLIENTEVENT_USER_STATECHANGE :
4619  if (OnUserStateChange != null)
4621  break;
4622  case ClientEvent.CLIENTEVENT_USER_VIDEOCAPTURE:
4623  if (OnUserVideoCapture != null)
4624  OnUserVideoCapture(msg.nSource, (int)msg.DataToObject());
4625  break;
4626  case ClientEvent.CLIENTEVENT_USER_MEDIAFILE_VIDEO:
4627  if (OnUserMediaFileVideo != null)
4628  OnUserMediaFileVideo((int)msg.nSource, (int)msg.DataToObject());
4629  break;
4630  case ClientEvent.CLIENTEVENT_USER_DESKTOPWINDOW:
4631  if (OnUserDesktopWindow != null)
4632  OnUserDesktopWindow((int)msg.nSource, (int)msg.DataToObject());
4633  break;
4634  case ClientEvent.CLIENTEVENT_USER_DESKTOPCURSOR:
4635  if (OnUserDesktopCursor != null)
4637  break;
4638  case ClientEvent.CLIENTEVENT_USER_DESKTOPINPUT :
4639  if (OnUserDesktopInput != null)
4641  break;
4642  case ClientEvent.CLIENTEVENT_USER_RECORD_MEDIAFILE :
4643  if(OnUserRecordMediaFile != null)
4645  break;
4646  case ClientEvent.CLIENTEVENT_USER_AUDIOBLOCK :
4647  if(OnUserAudioBlock != null)
4648  OnUserAudioBlock((int)msg.nSource, (StreamType)msg.DataToObject());
4649  break;
4650  case ClientEvent.CLIENTEVENT_INTERNAL_ERROR :
4651  if(OnInternalError!= null)
4653  break;
4654  case ClientEvent.CLIENTEVENT_VOICE_ACTIVATION :
4655  if(OnVoiceActivation != null)
4656  OnVoiceActivation((bool)msg.DataToObject());
4657  break;
4658  case ClientEvent.CLIENTEVENT_HOTKEY :
4659  if(OnHotKeyToggle != null)
4660  OnHotKeyToggle(msg.nSource, (bool)msg.DataToObject());
4661  break;
4662  case ClientEvent.CLIENTEVENT_HOTKEY_TEST :
4663  if(OnHotKeyTest != null)
4664  OnHotKeyTest(msg.nSource, (bool)msg.DataToObject());
4665  break;
4666  case ClientEvent.CLIENTEVENT_FILETRANSFER :
4667  if(OnFileTransfer != null)
4669  break;
4670  case ClientEvent.CLIENTEVENT_DESKTOPWINDOW_TRANSFER :
4671  if(OnDesktopWindowTransfer != null)
4672  OnDesktopWindowTransfer(msg.nSource, (int)msg.DataToObject());
4673  break;
4674  case ClientEvent.CLIENTEVENT_STREAM_MEDIAFILE :
4675  if(OnStreamMediaFile != null)
4677  break;
4678  case ClientEvent.CLIENTEVENT_LOCAL_MEDIAFILE:
4679  if (OnLocalMediaFile != null)
4681  break;
4682  case ClientEvent.CLIENTEVENT_AUDIOINPUT:
4683  if (OnAudioInput != null)
4685  break;
4686  case ClientEvent.CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET:
4687  if (OnUserFirstVoiceStreamPacket != null)
4689  break;
4690  }
4691  }
4692 
4705  public static bool GetDefaultSoundDevices(ref int lpnInputDeviceID,
4706  ref int lpnOutputDeviceID)
4707  {
4708  return TTDLL.TT_GetDefaultSoundDevices(ref lpnInputDeviceID, ref lpnOutputDeviceID);
4709  }
4714  public static bool GetDefaultSoundDevicesEx(SoundSystem nSndSystem,
4715  ref int lpnInputDeviceID,
4716  ref int lpnOutputDeviceID)
4717  {
4718  return TTDLL.TT_GetDefaultSoundDevicesEx(nSndSystem, ref lpnInputDeviceID, ref lpnOutputDeviceID);
4719  }
4728  public static bool GetSoundDevices(out SoundDevice[] lpSoundDevices)
4729  {
4730  int count = 0;
4731  bool b = TTDLL.TT_GetSoundDevices_NULL(IntPtr.Zero, ref count);
4732  SoundDevice[] devs = new SoundDevice[count];
4733  b = TTDLL.TT_GetSoundDevices(devs, ref count);
4734  lpSoundDevices = b ? devs : null;
4735  return b;
4736  }
4752  public static bool RestartSoundSystem()
4753  {
4754  return TTDLL.TT_RestartSoundSystem();
4755  }
4760  public static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID,
4761  int nSampleRate, int nChannels,
4762  bool bDuplexMode, SpeexDSP lpSpeexDSP)
4763  {
4764  return TTDLL.TT_StartSoundLoopbackTest(nInputDeviceID, nOutputDeviceID,
4765  nSampleRate, nChannels, bDuplexMode,
4766  ref lpSpeexDSP);
4767  }
4799  public static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID,
4800  int nSampleRate, int nChannels,
4801  bool bDuplexMode, AudioPreprocessor lpAudioPreprocessor,
4802  BearWare.SoundDeviceEffects lpSoundDeviceEffects)
4803  {
4804  return TTDLL.TT_StartSoundLoopbackTestEx(nInputDeviceID, nOutputDeviceID,
4805  nSampleRate, nChannels, bDuplexMode,
4806  ref lpAudioPreprocessor, ref lpSoundDeviceEffects);
4807  }
4814  public static bool CloseSoundLoopbackTest(IntPtr lpTTSoundLoop)
4815  {
4816  return TTDLL.TT_CloseSoundLoopbackTest(lpTTSoundLoop);
4817  }
4846  public bool InitSoundInputDevice(int nInputDeviceID)
4847  {
4848  return TTDLL.TT_InitSoundInputDevice(m_ttInst, nInputDeviceID);
4849  }
4850 
4881  public bool InitSoundInputSharedDevice(int nSampleRate,int nChannels, int nFrameSize)
4882  {
4883  return TTDLL.TT_InitSoundInputSharedDevice(nSampleRate, nChannels, nFrameSize);
4884  }
4885 
4914  public bool InitSoundOutputDevice(int nOutputDeviceID)
4915  {
4916  return TTDLL.TT_InitSoundOutputDevice(m_ttInst, nOutputDeviceID);
4917  }
4948  public bool InitSoundOutputSharedDevice(int nSampleRate, int nChannels,int nFrameSize)
4949  {
4950  return TTDLL.TT_InitSoundOutputSharedDevice(nSampleRate, nChannels, nFrameSize);
4951  }
4985  public bool InitSoundDuplexDevices(int nInputDeviceID, int nOutputDeviceID)
4986  {
4987  return TTDLL.TT_InitSoundDuplexDevices(m_ttInst, nInputDeviceID, nOutputDeviceID);
4988  }
5009  {
5010  return TTDLL.TT_CloseSoundInputDevice(m_ttInst);
5011  }
5031  {
5032  return TTDLL.TT_CloseSoundOutputDevice(m_ttInst);
5033  }
5041  {
5042  return TTDLL.TT_CloseSoundDuplexDevices(m_ttInst);
5043  }
5079  public bool SetSoundDeviceEffects(SoundDeviceEffects lpSoundDeviceEffect)
5080  {
5081  return TTDLL.TT_SetSoundDeviceEffects(m_ttInst, ref lpSoundDeviceEffect);
5082  }
5087  public bool GetSoundDeviceEffects(ref SoundDeviceEffects lpSoundDeviceEffect)
5088  {
5089  return TTDLL.TT_GetSoundDeviceEffects(m_ttInst, ref lpSoundDeviceEffect);
5090  }
5107  public int GetSoundInputLevel()
5108  {
5109  return TTDLL.TT_GetSoundInputLevel(m_ttInst);
5110  }
5126  public bool SetSoundInputGainLevel(int nLevel)
5127  {
5128  return TTDLL.TT_SetSoundInputGainLevel(m_ttInst, nLevel);
5129  }
5137  {
5138  return TTDLL.TT_GetSoundInputGainLevel(m_ttInst);
5139  }
5140 
5156  public bool SetSoundInputPreprocess(SpeexDSP lpSpeexDSP)
5157  {
5158  return TTDLL.TT_SetSoundInputPreprocess(m_ttInst, ref lpSpeexDSP);
5159  }
5160 
5169  public bool GetSoundInputPreprocess(ref SpeexDSP lpSpeexDSP)
5170  {
5171  return TTDLL.TT_GetSoundInputPreprocess(m_ttInst, ref lpSpeexDSP);
5172  }
5184  public bool SetSoundInputPreprocess(AudioPreprocessor lpAudioPreprocessor)
5185  {
5186  return TTDLL.TT_SetSoundInputPreprocessEx(m_ttInst, ref lpAudioPreprocessor);
5187  }
5188 
5196  public bool GetSoundInputPreprocess(ref AudioPreprocessor lpAudioPreprocessor)
5197  {
5198  return TTDLL.TT_GetSoundInputPreprocessEx(m_ttInst, ref lpAudioPreprocessor);
5199  }
5207  public bool SetSoundOutputVolume(int nVolume)
5208  {
5209  return TTDLL.TT_SetSoundOutputVolume(m_ttInst, nVolume);
5210  }
5218  {
5219  return TTDLL.TT_GetSoundOutputVolume(m_ttInst);
5220  }
5228  public bool SetSoundOutputMute(bool bMuteAll)
5229  {
5230  return TTDLL.TT_SetSoundOutputMute(m_ttInst, bMuteAll);
5231  }
5242  public bool Enable3DSoundPositioning(bool bEnable)
5243  {
5244  return TTDLL.TT_Enable3DSoundPositioning(m_ttInst, bEnable);
5245  }
5255  public bool AutoPositionUsers()
5256  {
5257  return TTDLL.TT_AutoPositionUsers(m_ttInst);
5258  }
5259 
5323  public bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes,
5324  bool bEnable)
5325  {
5326  return TTDLL.TT_EnableAudioBlockEvent(m_ttInst, nUserID, uStreamTypes, bEnable);
5327  }
5356  public bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes,
5357  AudioFormat lpAudioFormat, bool bEnable)
5358  {
5359  return TTDLL.TT_EnableAudioBlockEventEx(m_ttInst, nUserID, uStreamTypes, ref lpAudioFormat, bEnable);
5360  }
5395  public bool InsertAudioBlock(AudioBlock lpAudioBlock)
5396  {
5397  return TTDLL.TT_InsertAudioBlock(m_ttInst, ref lpAudioBlock);
5398  }
5399 
5417  public bool EnableVoiceTransmission(bool bEnable)
5418  {
5419  return TTDLL.TT_EnableVoiceTransmission(m_ttInst, bEnable);
5420  }
5421 
5447  public bool EnableVoiceActivation(bool bEnable)
5448  {
5449  return TTDLL.TT_EnableVoiceActivation(m_ttInst, bEnable);
5450  }
5465  public bool SetVoiceActivationLevel(int nLevel)
5466  {
5467  return TTDLL.TT_SetVoiceActivationLevel(m_ttInst, nLevel);
5468  }
5476  {
5477  return TTDLL.TT_GetVoiceActivationLevel(m_ttInst);
5478  }
5491  public bool SetVoiceActivationStopDelay(int nDelayMSec)
5492  {
5493  return TTDLL.TT_SetVoiceActivationStopDelay(m_ttInst, nDelayMSec);
5494  }
5495 
5506  {
5507  return TTDLL.TT_GetVoiceActivationStopDelay(m_ttInst);
5508  }
5509 
5552  public bool StartRecordingMuxedAudioFile(AudioCodec lpAudioCodec,
5553  string szAudioFileName,
5554  AudioFileFormat uAFF)
5555  {
5556  return TTDLL.TT_StartRecordingMuxedAudioFile(m_ttInst,
5557  ref lpAudioCodec,
5558  szAudioFileName,
5559  uAFF);
5560  }
5561 
5581  public bool StartRecordingMuxedAudioFile(int nChannelID,
5582  string szAudioFileName,
5583  AudioFileFormat uAFF)
5584  {
5585  return TTDLL.TT_StartRecordingMuxedAudioFileEx(m_ttInst,
5586  nChannelID,
5587  szAudioFileName,
5588  uAFF);
5589  }
5590 
5591 
5623  public bool StartRecordingMuxedStreams(StreamType uStreamTypes,
5624  AudioCodec lpAudioCodec,
5625  string szAudioFileName,
5626  AudioFileFormat uAFF)
5627  {
5628  return TTDLL.TT_StartRecordingMuxedStreams(m_ttInst, uStreamTypes, ref lpAudioCodec, szAudioFileName, uAFF);
5629  }
5630 
5643  {
5644  return TTDLL.TT_StopRecordingMuxedAudioFile(m_ttInst);
5645  }
5646 
5653  public bool StopRecordingMuxedAudioFile(int nChannelID)
5654  {
5655  return TTDLL.TT_StopRecordingMuxedAudioFileEx(m_ttInst, nChannelID);
5656  }
5657 
5680  public bool StartVideoCaptureTransmission(VideoCodec lpVideoCodec)
5681  {
5682  return TTDLL.TT_StartVideoCaptureTransmission(m_ttInst, ref lpVideoCodec);
5683  }
5684 
5690  {
5691  return TTDLL.TT_StopVideoCaptureTransmission(m_ttInst);
5692  }
5693 
5705  public static bool GetVideoCaptureDevices(out VideoCaptureDevice[] lpVideoDevices)
5706  {
5707  //To speed up query we only query for a max of 25.
5708  //Hopefully no one has more than 25 capture devices.
5709  VideoCaptureDevice[] devs = new VideoCaptureDevice[25];
5710  int count = devs.Length;
5711  bool b = TTDLL.TT_GetVideoCaptureDevices(devs, ref count);
5712  if (b)
5713  {
5714  lpVideoDevices = new VideoCaptureDevice[count];
5715  for (int i = 0; i < count; i++)
5716  lpVideoDevices[i] = devs[i];
5717  }
5718  else lpVideoDevices = null;
5719 
5720  return b;
5721  }
5733  public bool InitVideoCaptureDevice(string szDeviceID,
5734  VideoFormat lpVideoFormat)
5735  {
5736  return TTDLL.TT_InitVideoCaptureDevice(m_ttInst, szDeviceID, ref lpVideoFormat);
5737  }
5743  {
5744  return TTDLL.TT_CloseVideoCaptureDevice(m_ttInst);
5745  }
5760  public bool PaintVideoFrame(int nUserID,
5761  System.IntPtr hDC,
5762  int XDest,
5763  int YDest,
5764  int nDestWidth,
5765  int nDestHeight,
5766  ref VideoFrame lpVideoFrame)
5767  {
5768  return TTDLL.TT_PaintVideoFrame(nUserID, hDC, XDest, YDest, nDestWidth,
5769  nDestHeight, ref lpVideoFrame);
5770  }
5771 
5803  public bool PaintVideoFrameEx(int nUserID,
5804  System.IntPtr hDC,
5805  int XDest,
5806  int YDest,
5807  int nDestWidth,
5808  int nDestHeight,
5809  int XSrc,
5810  int YSrc,
5811  int nSrcWidth,
5812  int nSrcHeight,
5813  ref VideoFrame lpVideoFrame)
5814  {
5815  return TTDLL.TT_PaintVideoFrameEx(nUserID, hDC, XDest, YDest, nDestWidth, nDestHeight,
5816  XSrc, YSrc, nSrcWidth, nSrcHeight,
5817  ref lpVideoFrame);
5818  }
5819 
5838  public VideoFrame AcquireUserVideoCaptureFrame(int nUserID, out Bitmap bmp)
5839  {
5840  bmp = null;
5841  IntPtr ptr = TTDLL.TT_AcquireUserVideoCaptureFrame(m_ttInst, nUserID);
5842  if(ptr == IntPtr.Zero)
5843  return new VideoFrame();
5844 
5845  VideoFrame frm = (VideoFrame)Marshal.PtrToStructure(ptr, typeof(VideoFrame));
5846  vidcapframes.Add(frm.frameBuffer, ptr);
5847 
5848  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
5849  bmp = new Bitmap(frm.nWidth, frm.nHeight, frm.nWidth*4, pixelformat, frm.frameBuffer);
5850  return frm;
5851  }
5852 
5853  Dictionary<IntPtr, IntPtr> vidcapframes = new Dictionary<IntPtr, IntPtr>();
5854 
5862  public bool ReleaseUserVideoCaptureFrame(VideoFrame lpVideoFrame)
5863  {
5864  IntPtr ptr;
5865  if (vidcapframes.TryGetValue(lpVideoFrame.frameBuffer, out ptr))
5866  {
5867  vidcapframes.Remove(lpVideoFrame.frameBuffer);
5868  return TTDLL.TT_ReleaseUserVideoCaptureFrame(m_ttInst, ptr);
5869  }
5870  return false;
5871  }
5872 
5885  /*
5886  public bool GetUserVideoFrame(int nUserID,
5887  ref System.Drawing.Bitmap lpPicture)
5888  {
5889  CaptureFormat cap;
5890  if (!TTDLL.TT_GetUserVideoFrame(m_ttInst, nUserID, IntPtr.Zero, 0, out cap))
5891  return false;
5892 
5893  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
5894 
5895  if (lpPicture == null ||
5896  lpPicture.Width != cap.nWidth ||
5897  lpPicture.Height != cap.nHeight
5898 #if PocketPC
5899  )
5900 #else
5901  || lpPicture.PixelFormat != pixelformat)
5902 #endif
5903  {
5904  lpPicture = new Bitmap(cap.nWidth, cap.nHeight,
5905  pixelformat);
5906  }
5907 
5908  // Lock the bitmap's bits.
5909  System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, lpPicture.Width, lpPicture.Height);
5910  BitmapData bmpData = lpPicture.LockBits(rect, ImageLockMode.ReadWrite, pixelformat);
5911 
5912  // Get the address of the first line.
5913  IntPtr ptr = bmpData.Scan0;
5914 
5915  bool b = TTDLL.TT_GetUserVideoFrame(m_ttInst, nUserID, ptr,
5916  cap.nWidth * cap.nHeight * 4, out cap);
5917  // Unlock the bits.
5918  lpPicture.UnlockBits(bmpData);
5919  return b;
5920  }
5921  * */
5922 
5930  public bool StartStreamingMediaFileToChannel(string szMediaFilePath,
5931  VideoCodec lpVideoCodec)
5932  {
5933  return TTDLL.TT_StartStreamingMediaFileToChannel(m_ttInst, szMediaFilePath,
5934  ref lpVideoCodec);
5935  }
5936 
5966  public bool StartStreamingMediaFileToChannel(string szMediaFilePath,
5967  MediaFilePlayback lpMediaFilePlayback,
5968  VideoCodec lpVideoCodec)
5969  {
5970  return TTDLL.TT_StartStreamingMediaFileToChannelEx(m_ttInst, szMediaFilePath,
5971  ref lpMediaFilePlayback,
5972  ref lpVideoCodec);
5973  }
5974 
5991  public bool UpdateStreamingMediaFileToChannel(MediaFilePlayback lpMediaFilePlayback,
5992  VideoCodec lpVideoCodec)
5993  {
5994  return TTDLL.TT_UpdateStreamingMediaFileToChannel(m_ttInst, ref lpMediaFilePlayback, ref lpVideoCodec);
5995  }
5996 
6005  {
6006  return TTDLL.TT_StopStreamingMediaFileToChannel(m_ttInst);
6007  }
6008 
6033  public int InitLocalPlayback(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback)
6034  {
6035  return TTDLL.TT_InitLocalPlayback(m_ttInst, szMediaFilePath, ref lpMediaFilePlayback);
6036  }
6037 
6049  public bool UpdateLocalPlayback(int nPlaybackSessionID,
6050  MediaFilePlayback lpMediaFilePlayback)
6051  {
6052  return TTDLL.TT_UpdateLocalPlayback(m_ttInst, nPlaybackSessionID, ref lpMediaFilePlayback);
6053  }
6054 
6063  public bool StopLocalPlayback(int nPlaybackSessionID)
6064  {
6065  return TTDLL.TT_StopLocalPlayback(m_ttInst, nPlaybackSessionID);
6066  }
6067 
6075  public static bool GetMediaFileInfo(string szMediaFilePath,
6076  ref MediaFileInfo lpMediaFileInfo)
6077  {
6078  return TTDLL.TT_GetMediaFileInfo(szMediaFilePath, ref lpMediaFileInfo);
6079  }
6080 
6100  public VideoFrame AcquireUserMediaVideoFrame(int nUserID, out Bitmap bmp)
6101  {
6102  bmp = null;
6103  IntPtr ptr = TTDLL.TT_AcquireUserMediaVideoFrame(m_ttInst, nUserID);
6104  if (ptr == IntPtr.Zero)
6105  return new VideoFrame();
6106 
6107  VideoFrame frm = (VideoFrame)Marshal.PtrToStructure(ptr, typeof(VideoFrame));
6108  mediaframes.Add(frm.frameBuffer, ptr);
6109 
6110  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
6111  bmp = new Bitmap(frm.nWidth, frm.nHeight, frm.nWidth * 4, pixelformat, frm.frameBuffer);
6112  return frm;
6113  }
6114 
6122  public bool ReleaseUserMediaVideoFrame(VideoFrame lpVideoFrame)
6123  {
6124  IntPtr ptr;
6125  if (mediaframes.TryGetValue(lpVideoFrame.frameBuffer, out ptr))
6126  {
6127  mediaframes.Remove(lpVideoFrame.frameBuffer);
6128  return TTDLL.TT_ReleaseUserMediaVideoFrame(m_ttInst, ptr);
6129  }
6130  return false;
6131  }
6132 
6133  Dictionary<IntPtr, IntPtr> mediaframes = new Dictionary<IntPtr, IntPtr>();
6134 
6177  public int SendDesktopWindow(DesktopWindow lpDesktopWindow,
6178  BitmapFormat nConvertBmpFormat)
6179  {
6180  return TTDLL.TT_SendDesktopWindow(m_ttInst, ref lpDesktopWindow, nConvertBmpFormat);
6181  }
6182 
6190  public bool CloseDesktopWindow()
6191  {
6192  return TTDLL.TT_CloseDesktopWindow(m_ttInst);
6193  }
6194 
6211  public static System.Drawing.Color Palette_GetColorTable(BitmapFormat nBmpPalette,
6212  int nIndex)
6213  {
6214  IntPtr ptr = TTDLL.TT_Palette_GetColorTable(nBmpPalette, nIndex);
6215  switch(nBmpPalette)
6216  {
6217  case BitmapFormat.BMP_RGB8_PALETTE:
6218  return Color.FromArgb(Marshal.ReadInt32(ptr));
6219  }
6220  return new Color();
6221  }
6222 
6233  public int SendDesktopWindowFromHWND(System.IntPtr hWnd,
6234  BitmapFormat nBitmapFormat,
6235  DesktopProtocol nDesktopProtocol)
6236  {
6237  return TTDLL.TT_SendDesktopWindowFromHWND(m_ttInst, hWnd, nBitmapFormat, nDesktopProtocol);
6238  }
6239 
6254  public bool PaintDesktopWindow(int nUserID,
6255  System.IntPtr hDC,
6256  int XDest,
6257  int YDest,
6258  int nDestWidth,
6259  int nDestHeight)
6260  {
6261  return TTDLL.TT_PaintDesktopWindow(m_ttInst, nUserID, hDC, XDest, YDest, nDestWidth, nDestHeight);
6262  }
6263 
6296  public bool PaintDesktopWindowEx(int nUserID,
6297  System.IntPtr hDC,
6298  int XDest,
6299  int YDest,
6300  int nDestWidth,
6301  int nDestHeight,
6302  int XSrc,
6303  int YSrc,
6304  int nSrcWidth,
6305  int nSrcHeight)
6306  {
6307  return TTDLL.TT_PaintDesktopWindowEx(m_ttInst, nUserID, hDC, XDest,
6308  YDest, nDestWidth, nDestHeight,
6309  XSrc, YSrc, nSrcWidth, nSrcHeight);
6310  }
6311 
6324  public bool SendDesktopCursorPosition(ushort nPosX,
6325  ushort nPosY)
6326  {
6327  return TTDLL.TT_SendDesktopCursorPosition(m_ttInst, nPosX, nPosY);
6328  }
6329 
6353  public bool SendDesktopInput(int nUserID,
6354  DesktopInput[] lpDesktopInputs)
6355  {
6356  return TTDLL.TT_SendDesktopInput(m_ttInst, nUserID, lpDesktopInputs, lpDesktopInputs.Length);
6357  }
6358 
6383  {
6384  IntPtr ptr = TTDLL.TT_AcquireUserDesktopWindow(m_ttInst, nUserID);
6385  if (ptr == IntPtr.Zero)
6386  return new DesktopWindow();
6387  DesktopWindow lpDesktopWindow = (DesktopWindow)Marshal.PtrToStructure(ptr, typeof(DesktopWindow));
6388  desktopwindows.Add(lpDesktopWindow.frameBuffer, ptr);
6389  return lpDesktopWindow;
6390  }
6391 
6398  public DesktopWindow AcquireUserDesktopWindowEx(int nUserID, BitmapFormat nBitmapFormat)
6399  {
6400  IntPtr ptr = TTDLL.TT_AcquireUserDesktopWindowEx(m_ttInst, nUserID, nBitmapFormat);
6401  if (ptr == IntPtr.Zero)
6402  return new DesktopWindow();
6403  DesktopWindow lpDesktopWindow = (DesktopWindow)Marshal.PtrToStructure(ptr, typeof(DesktopWindow));
6404  desktopwindows.Add(lpDesktopWindow.frameBuffer, ptr);
6405  return lpDesktopWindow;
6406  }
6407 
6408  Dictionary<IntPtr, IntPtr> desktopwindows = new Dictionary<IntPtr, IntPtr>();
6411  public bool ReleaseUserDesktopWindow(DesktopWindow lpDesktopWindow)
6412  {
6413  IntPtr ptr;
6414  if (desktopwindows.TryGetValue(lpDesktopWindow.frameBuffer, out ptr))
6415  {
6416  desktopwindows.Remove(lpDesktopWindow.frameBuffer);
6417  return TTDLL.TT_ReleaseUserDesktopWindow(m_ttInst, ptr);
6418  }
6419  return false;
6420  }
6421 
6438  public bool SetEncryptionContext(EncryptionContext lpEncryptionContext)
6439  {
6440  return TTDLL.TT_SetEncryptionContext(m_ttInst, ref lpEncryptionContext);
6441  }
6442 
6471  public bool Connect(string szHostAddress,
6472  int nTcpPort,
6473  int nUdpPort,
6474  int nLocalTcpPort,
6475  int nLocalUdpPort,
6476  bool bEncrypted)
6477  {
6478  return TTDLL.TT_Connect(m_ttInst, szHostAddress, nTcpPort, nUdpPort,
6479  nLocalTcpPort, nLocalUdpPort, bEncrypted);
6480  }
6481 
6505  public bool ConnectSysID(string szHostAddress,
6506  int nTcpPort,
6507  int nUdpPort,
6508  int nLocalTcpPort,
6509  int nLocalUdpPort,
6510  bool bEncrypted,
6511  string szSystemID)
6512  {
6513  return TTDLL.TT_ConnectSysID(m_ttInst, szHostAddress,
6514  nTcpPort, nUdpPort, nLocalTcpPort,
6515  nLocalUdpPort, bEncrypted, szSystemID);
6516  }
6517 
6538  public bool ConnectEx(string szHostAddress,
6539  int nTcpPort,
6540  int nUdpPort,
6541  string szBindIPAddr,
6542  int nLocalTcpPort,
6543  int nLocalUdpPort,
6544  bool bEncrypted)
6545  {
6546  return TTDLL.TT_ConnectEx(m_ttInst, szHostAddress, nTcpPort, nUdpPort,
6547  szBindIPAddr, nLocalTcpPort, nLocalUdpPort,
6548  bEncrypted);
6549  }
6550 
6555  public bool Disconnect()
6556  {
6557  return TTDLL.TT_Disconnect(m_ttInst);
6558  }
6568  public bool QueryMaxPayload(int nUserID)
6569  {
6570  return TTDLL.TT_QueryMaxPayload(m_ttInst, nUserID);
6571  }
6577  public bool GetClientStatistics(ref ClientStatistics lpClientStatistics)
6578  {
6579  return TTDLL.TT_GetClientStatistics(m_ttInst, ref lpClientStatistics);
6580  }
6581 
6596  public bool SetClientKeepAlive(ClientKeepAlive lpClientKeepAlive)
6597  {
6598  return TTDLL.TT_SetClientKeepAlive(m_ttInst, ref lpClientKeepAlive);
6599  }
6600 
6607  public bool GetClientKeepAlive(ref ClientKeepAlive lpClientKeepAlive)
6608  {
6609  return TTDLL.TT_GetClientKeepAlive(m_ttInst, ref lpClientKeepAlive);
6610  }
6633  public int DoPing()
6634  {
6635  return TTDLL.TT_DoPing(m_ttInst);
6636  }
6637 
6649  public int DoLogin(string szNickname, string szUsername, string szPassword)
6650  {
6651  return TTDLL.TT_DoLogin(m_ttInst, szNickname, szUsername, szPassword);
6652  }
6653 
6683  public int DoLoginEx(string szNickname, string szUsername, string szPassword,
6684  string szClientName)
6685  {
6686  return TTDLL.TT_DoLoginEx(m_ttInst, szNickname, szUsername, szPassword, szClientName);
6687  }
6701  public int DoLogout()
6702  {
6703  return TTDLL.TT_DoLogout(m_ttInst);
6704  }
6744  public int DoJoinChannel(Channel lpChannel)
6745  {
6746  return TTDLL.TT_DoJoinChannel(m_ttInst, ref lpChannel);
6747  }
6771  public int DoJoinChannelByID(int nChannelID, string szPassword)
6772  {
6773  return TTDLL.TT_DoJoinChannelByID(m_ttInst, nChannelID, szPassword);
6774  }
6794  public int DoLeaveChannel()
6795  {
6796  return TTDLL.TT_DoLeaveChannel(m_ttInst);
6797  }
6815  public int DoChangeNickname(string szNewNick)
6816  {
6817  return TTDLL.TT_DoChangeNickname(m_ttInst, szNewNick);
6818  }
6838  public int DoChangeStatus(int nStatusMode, string szStatusMessage)
6839  {
6840  return TTDLL.TT_DoChangeStatus(m_ttInst, nStatusMode, szStatusMessage);
6841  }
6860  public int DoTextMessage(TextMessage lpTextMessage)
6861  {
6862  return TTDLL.TT_DoTextMessage(m_ttInst, ref lpTextMessage);
6863  }
6884  public int DoChannelOp(int nUserID, int nChannelID, bool bMakeOperator)
6885  {
6886  return TTDLL.TT_DoChannelOp(m_ttInst, nUserID, nChannelID, bMakeOperator);
6887  }
6907  public int DoChannelOpEx(int nUserID,
6908  int nChannelID,
6909  string szOpPassword,
6910  bool bMakeOperator)
6911  {
6912  return TTDLL.TT_DoChannelOpEx(m_ttInst, nUserID, nChannelID, szOpPassword, bMakeOperator);
6913  }
6936  public int DoKickUser(int nUserID, int nChannelID)
6937  {
6938  return TTDLL.TT_DoKickUser(m_ttInst, nUserID, nChannelID);
6939  }
6974  public int DoSendFile(int nChannelID, string szLocalFilePath)
6975  {
6976  return TTDLL.TT_DoSendFile(m_ttInst, nChannelID, szLocalFilePath);
6977  }
7007  public int DoRecvFile(int nChannelID, int nFileID, string szLocalFilePath)
7008  {
7009  return TTDLL.TT_DoRecvFile(m_ttInst, nChannelID, nFileID, szLocalFilePath);
7010  }
7033  public int DoDeleteFile(int nChannelID, int nFileID)
7034  {
7035  return TTDLL.TT_DoDeleteFile(m_ttInst, nChannelID, nFileID);
7036  }
7051  public int DoSubscribe(int nUserID, Subscription uSubscriptions)
7052  {
7053  return TTDLL.TT_DoSubscribe(m_ttInst, nUserID, uSubscriptions);
7054  }
7070  public int DoUnsubscribe(int nUserID, Subscription uSubscriptions)
7071  {
7072  return TTDLL.TT_DoUnsubscribe(m_ttInst, nUserID, uSubscriptions);
7073  }
7099  public int DoMakeChannel(Channel lpChannel)
7100  {
7101  return TTDLL.TT_DoMakeChannel(m_ttInst, ref lpChannel);
7102  }
7135  public int DoUpdateChannel(Channel lpChannel)
7136  {
7137  return TTDLL.TT_DoUpdateChannel(m_ttInst, ref lpChannel);
7138  }
7157  public int DoRemoveChannel(int nChannelID)
7158  {
7159  return TTDLL.TT_DoRemoveChannel(m_ttInst, nChannelID);
7160  }
7180  public int DoMoveUser(int nUserID, int nChannelID)
7181  {
7182  return TTDLL.TT_DoMoveUser(m_ttInst, nUserID, nChannelID);
7183  }
7200  public int DoUpdateServer(ServerProperties lpServerProperties)
7201  {
7202  return TTDLL.TT_DoUpdateServer(m_ttInst, ref lpServerProperties);
7203  }
7228  public int DoListUserAccounts(int nIndex, int nCount)
7229  {
7230  return TTDLL.TT_DoListUserAccounts(m_ttInst, nIndex, nCount);
7231  }
7254  public int DoNewUserAccount(UserAccount lpUserAccount)
7255  {
7256  return TTDLL.TT_DoNewUserAccount(m_ttInst, ref lpUserAccount);
7257  }
7276  public int DoDeleteUserAccount(string szUsername)
7277  {
7278  return TTDLL.TT_DoDeleteUserAccount(m_ttInst, szUsername);
7279  }
7307  public int DoBanUser(int nUserID, int nChannelID)
7308  {
7309  return TTDLL.TT_DoBanUser(m_ttInst, nUserID, nChannelID);
7310  }
7311 
7323  public int DoBanUserEx(int nUserID, BanType uBanTypes)
7324  {
7325  return TTDLL.TT_DoBanUserEx(m_ttInst, nUserID, uBanTypes);
7326  }
7327 
7346  public int DoBan(BannedUser lpBannedUser)
7347  {
7348  return TTDLL.TT_DoBan(m_ttInst, ref lpBannedUser);
7349  }
7350 
7371  public int DoBanIPAddress(string szIPAddress, int nChannelID)
7372  {
7373  return TTDLL.TT_DoBanIPAddress(m_ttInst, szIPAddress, nChannelID);
7374  }
7375 
7396  public int DoUnBanUser(string szIPAddress, int nChannelID)
7397  {
7398  return TTDLL.TT_DoUnBanUser(m_ttInst, szIPAddress, nChannelID);
7399  }
7400 
7410  public int DoUnBanUserEx(BannedUser lpBannedUser)
7411  {
7412  return TTDLL.TT_DoUnBanUserEx(m_ttInst, ref lpBannedUser);
7413  }
7414 
7435  public int DoListBans(int nChannelID, int nIndex, int nCount)
7436  {
7437  return TTDLL.TT_DoListBans(m_ttInst, nChannelID, nIndex, nCount);
7438  }
7456  public int DoSaveConfig()
7457  {
7458  return TTDLL.TT_DoSaveConfig(m_ttInst);
7459  }
7476  public int DoQueryServerStats()
7477  {
7478  return TTDLL.TT_DoQueryServerStats(m_ttInst);
7479  }
7492  public int DoQuit()
7493  {
7494  return TTDLL.TT_DoQuit(m_ttInst);
7495  }
7507  public bool GetServerProperties(ref ServerProperties lpServerProperties)
7508  {
7509  return TTDLL.TT_GetServerProperties(m_ttInst, ref lpServerProperties);
7510  }
7521  public bool GetServerUsers(out User[] lpUsers)
7522  {
7523  int count = 0;
7524  bool b = TTDLL.TT_GetServerUsers_NULL(m_ttInst, IntPtr.Zero, ref count);
7525  User[] users = new User[count];
7526  b = TTDLL.TT_GetServerUsers(m_ttInst, users, ref count);
7527  lpUsers = b ? users : null;
7528  return b;
7529  }
7542  public int GetRootChannelID()
7543  {
7544  return TTDLL.TT_GetRootChannelID(m_ttInst);
7545  }
7552  public int GetMyChannelID()
7553  {
7554  return TTDLL.TT_GetMyChannelID(m_ttInst);
7555  }
7559  public int ChannelID { get { return GetMyChannelID(); } }
7567  public bool GetChannel(int nChannelID, ref Channel lpChannel)
7568  {
7569  return TTDLL.TT_GetChannel(m_ttInst, nChannelID, ref lpChannel);
7570  }
7577  public bool GetChannelPath(int nChannelID, ref string szChannelPath)
7578  {
7579  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
7580  bool b = TTDLL.TT_GetChannelPath(m_ttInst, nChannelID, ptr);
7581  if(b)
7582  szChannelPath = Marshal.PtrToStringUni(ptr);
7583  Marshal.FreeHGlobal(ptr);
7584  return b;
7585  }
7592  public int GetChannelIDFromPath(string szChannelPath)
7593  {
7594  return TTDLL.TT_GetChannelIDFromPath(m_ttInst, szChannelPath);
7595  }
7604  public bool GetChannelUsers(int nChannelID, out User[] lpUsers)
7605  {
7606  int count = 0;
7607  bool b = TTDLL.TT_GetChannelUsers_NULL(m_ttInst, nChannelID, IntPtr.Zero, ref count);
7608  User[] users = new User[count];
7609  b = TTDLL.TT_GetChannelUsers(m_ttInst, nChannelID, users, ref count);
7610  lpUsers = b ? users : null;
7611  return b;
7612  }
7621  public bool GetChannelFiles(int nChannelID, out RemoteFile[] lpRemoteFiles)
7622  {
7623  int count = 0;
7624  bool b = TTDLL.TT_GetChannelFiles_NULL(m_ttInst, nChannelID, IntPtr.Zero, ref count);
7625  RemoteFile[] files = new RemoteFile[count];
7626  b = TTDLL.TT_GetChannelFiles(m_ttInst, nChannelID, files, ref count);
7627  lpRemoteFiles = b ? files : null;
7628  return b;
7629  }
7637  public bool GetChannelFile(int nChannelID, int nFileID, ref RemoteFile lpRemoteFile)
7638  {
7639  return TTDLL.TT_GetChannelFile(m_ttInst, nChannelID, nFileID, ref lpRemoteFile);
7640  }
7647  public bool IsChannelOperator(int nUserID, int nChannelID)
7648  {
7649  return TTDLL.TT_IsChannelOperator(m_ttInst, nUserID, nChannelID);
7650  }
7657  public bool GetServerChannels(out Channel[] lpChannels)
7658  {
7659  int count = 0;
7660  bool b = TTDLL.TT_GetServerChannels_NULL(m_ttInst, IntPtr.Zero, ref count);
7661  Channel[] channels = new Channel[count];
7662  b = TTDLL.TT_GetServerChannels(m_ttInst, channels, ref count);
7663  lpChannels = b ? channels : null;
7664  return b;
7665  }
7679  public int GetMyUserID()
7680  {
7681  return TTDLL.TT_GetMyUserID(m_ttInst);
7682  }
7683 
7694  public bool GetMyUserAccount(ref UserAccount lpUserAccount)
7695  {
7696  return TTDLL.TT_GetMyUserAccount(m_ttInst, ref lpUserAccount);
7697  }
7698 
7702  public int UserID { get { return GetMyUserID(); } }
7703 
7715  {
7716  return TTDLL.TT_GetMyUserType(m_ttInst);
7717  }
7718 
7722  public BearWare.UserType UserType { get { return GetMyUserType(); } }
7723 
7727  public BearWare.UserRight UserRights { get { return GetMyUserRights(); } }
7728 
7730  public BearWare.UserRight GetMyUserRights()
7731  {
7732  return TTDLL.TT_GetMyUserRights(m_ttInst);
7733  }
7734 
7744  public int GetMyUserData()
7745  {
7746  return TTDLL.TT_GetMyUserData(m_ttInst);
7747  }
7748 
7752  public int UserData { get { return GetMyUserData(); } }
7753 
7760  public bool GetUser(int nUserID, ref User lpUser)
7761  {
7762  return TTDLL.TT_GetUser(m_ttInst, nUserID, ref lpUser);
7763  }
7769  public bool GetUserStatistics(int nUserID, ref UserStatistics lpUserStatistics)
7770  {
7771  return TTDLL.TT_GetUserStatistics(m_ttInst, nUserID, ref lpUserStatistics);
7772  }
7781  public bool GetUserByUsername(string szUsername, ref User lpUser)
7782  {
7783  return TTDLL.TT_GetUserByUsername(m_ttInst, szUsername, ref lpUser);
7784  }
7801  public bool SetUserVolume(int nUserID, StreamType nStreamType, int nVolume)
7802  {
7803  return TTDLL.TT_SetUserVolume(m_ttInst, nUserID, nStreamType, nVolume);
7804  }
7816  public bool SetUserMute(int nUserID, StreamType nStreamType, bool bMute)
7817  {
7818  return TTDLL.TT_SetUserMute(m_ttInst, nUserID, nStreamType, bMute);
7819  }
7832  public bool SetUserStoppedPlaybackDelay(int nUserID,
7833  StreamType nStreamType,
7834  int nDelayMSec)
7835  {
7836  return TTDLL.TT_SetUserStoppedPlaybackDelay(m_ttInst, nUserID, nStreamType, nDelayMSec);
7837  }
7838 
7863  public bool SetUserJitterControl(int nUserID,
7864  StreamType nStreamType,
7865  JitterConfig lpJitterConfig)
7866  {
7867  return TTDLL.TT_SetUserJitterControl(m_ttInst, nUserID, nStreamType, ref lpJitterConfig);
7868  }
7869 
7880  public bool GetUserJitterControl(int nUserID,
7881  StreamType nStreamType,
7882  ref JitterConfig lpJitterConfig)
7883  {
7884  return TTDLL.TT_GetUserJitterControl(m_ttInst, nUserID, nStreamType, ref lpJitterConfig);
7885  }
7886 
7902  public bool SetUserPosition(int nUserID, StreamType nStreamType,
7903  float x, float y, float z)
7904  {
7905  return TTDLL.TT_SetUserPosition(m_ttInst, nUserID, nStreamType, x, y, z);
7906  }
7918  public bool SetUserStereo(int nUserID, StreamType nStreamType, bool bLeftSpeaker, bool bRightSpeaker)
7919  {
7920  return TTDLL.TT_SetUserStereo(m_ttInst, nUserID, nStreamType, bLeftSpeaker, bRightSpeaker);
7921  }
7957  public bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars,
7958  AudioFileFormat uAFF)
7959  {
7960  return TTDLL.TT_SetUserMediaStorageDir(m_ttInst, nUserID, szFolderPath, szFileNameVars, uAFF);
7961  }
7962 
7987  public bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars,
7988  AudioFileFormat uAFF, int nStopRecordingExtraDelayMSec)
7989  {
7990  return TTDLL.TT_SetUserMediaStorageDirEx(m_ttInst, nUserID, szFolderPath, szFileNameVars, uAFF, nStopRecordingExtraDelayMSec);
7991  }
7992 
8017  public bool SetUserAudioStreamBufferSize(int nUserID, StreamType uStreamType,
8018  int nMSec)
8019  {
8020  return TTDLL.TT_SetUserAudioStreamBufferSize(m_ttInst, nUserID, uStreamType, nMSec);
8021  }
8041  public AudioBlock AcquireUserAudioBlock(StreamType uStreamTypes, int nUserID)
8042  {
8043  IntPtr ptr = TTDLL.TT_AcquireUserAudioBlock(m_ttInst, uStreamTypes, nUserID);
8044  if (ptr == IntPtr.Zero)
8045  return new AudioBlock();
8046  AudioBlock lpAudioBlock = (AudioBlock)Marshal.PtrToStructure(ptr, typeof(AudioBlock));
8047  audioblocks.Add(lpAudioBlock.lpRawAudio, ptr);
8048  return lpAudioBlock;
8049  }
8050 
8051  Dictionary<IntPtr, IntPtr> audioblocks = new Dictionary<IntPtr, IntPtr>();
8052 
8066  public bool ReleaseUserAudioBlock(AudioBlock lpAudioBlock)
8067  {
8068  IntPtr ptr;
8069  if (audioblocks.TryGetValue(lpAudioBlock.lpRawAudio, out ptr))
8070  {
8071  audioblocks.Remove(lpAudioBlock.lpRawAudio);
8072  return TTDLL.TT_ReleaseUserAudioBlock(m_ttInst, ptr);
8073  }
8074  return false;
8075  }
8089  public bool GetFileTransferInfo(int nTransferID, ref FileTransfer lpFileTransfer)
8090  {
8091  return TTDLL.TT_GetFileTransferInfo(m_ttInst, nTransferID, ref lpFileTransfer);
8092  }
8093 
8102  public bool CancelFileTranfer(int nTransferID)
8103  {
8104  return TTDLL.TT_CancelFileTransfer(m_ttInst, nTransferID);
8105  }
8106 
8117  public static string GetErrorMessage(ClientError nError)
8118  {
8119  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8120  TTDLL.TT_GetErrorMessage((int)nError, ptr);
8121  string s = Marshal.PtrToStringUni(ptr);
8122  Marshal.FreeHGlobal(ptr);
8123  return s;
8124  }
8125 
8152  public bool HotKey_Register(int nHotKeyID, int[] lpnVKCodes)
8153  {
8154  return TTDLL.TT_HotKey_Register(m_ttInst, nHotKeyID, lpnVKCodes, lpnVKCodes.Length);
8155  }
8161  public bool HotKey_Unregister(int nHotKeyID)
8162  {
8163  return TTDLL.TT_HotKey_Unregister(m_ttInst, nHotKeyID);
8164  }
8170  public int HotKey_IsActive(int nHotKeyID)
8171  {
8172  return TTDLL.TT_HotKey_IsActive(m_ttInst, nHotKeyID);
8173  }
8184  {
8185  if (m_eventhandler != null)
8186  {
8187 #if PocketPC
8188  IntPtr hWnd = m_eventhandler.Hwnd;
8189 #else
8190  IntPtr hWnd = m_eventhandler.Handle;
8191 #endif
8192  return TTDLL.TT_HotKey_InstallTestHook(m_ttInst, hWnd,
8193  MyEventHandler.WM_TEAMTALK_CLIENTEVENT);
8194  }
8195  return false;
8196  }
8203  {
8204  return TTDLL.TT_HotKey_RemoveTestHook(m_ttInst);
8205  }
8212  public bool HotKey_GetKeyString(int nVKCode, ref string szKeyName)
8213  {
8214  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8215  bool b = TTDLL.TT_HotKey_GetKeyString(m_ttInst, nVKCode, ptr);
8216  if(b)
8217  szKeyName = Marshal.PtrToStringUni(ptr);
8218  Marshal.FreeHGlobal(ptr);
8219  return b;
8220  }
8223  public bool DBG_SetSoundInputTone(StreamType uStreamTypes, int nFrequency)
8224  {
8225  return TTDLL.TT_DBG_SetSoundInputTone(m_ttInst, uStreamTypes, nFrequency);
8226  }
8227 
8228 
8229  public bool DBG_WriteAudioFileTone(MediaFileInfo lpMediaFileInfo,
8230  int nFrequency)
8231  {
8232  return TTDLL.TT_DBG_WriteAudioFileTone(ref lpMediaFileInfo, nFrequency);
8233  }
8234 
8241  public delegate void Connection();
8267 
8273  public delegate void MaxPayloadUpdate(int nPayloadSize);
8274 
8283 
8291  public delegate void CommandProcessing(int nCmdID, bool bActive);
8292 
8304 
8309  public delegate void CommandError(int nCmdID, ClientErrorMsg clienterrormsg);
8310 
8319  public event CommandError OnCmdError;
8320 
8324  public delegate void CommandSuccess(int nCmdID);
8325 
8334 
8340  public delegate void MyselfLoggedIn(int nMyUserID, UserAccount useraccount);
8341 
8351 
8353  public delegate void MyselfLoggedOut();
8362 
8368  public delegate void MyselfKicked(User user);
8375 
8380  public delegate void UserUpdate(User user);
8381 
8385  public delegate void UserStreamUpdate(User user, int nStreamID);
8386 
8395 
8405 
8411 
8417 
8423 
8429  public delegate void UserTextMessage(TextMessage textmessage);
8430 
8436 
8437 
8440  public delegate void ChannelUpdate(Channel channel);
8441 
8449 
8455 
8460 
8462  public delegate void ServerUpdate(ServerProperties serverproperties);
8463 
8470 
8472  public delegate void ServerStats(ServerStatistics serverstatistics);
8473 
8479 
8481  public delegate void FileUpdate(RemoteFile remotefile);
8482 
8487  public event FileUpdate OnCmdFileNew;
8488 
8494 
8496  public delegate void ListUserAccount(UserAccount useraccount);
8497 
8501 
8503  public delegate void ListBannedUser(BannedUser banneduser);
8504 
8508 
8514 
8519 
8521  public delegate void UserVideoFrame(int nUserID, int nStreamID);
8522 
8528 
8534 
8543  public delegate void NewDesktopWindow(int nUserID, int nStreamID);
8544 
8554 
8556  public delegate void UserDesktopInput(int nSrcUserID, DesktopInput desktopinput);
8557 
8564 
8571 
8573  public delegate void UserRecordMediaFile(int nUserID, MediaFileInfo mediafileinfo);
8574 
8580 
8582  public delegate void NewAudioBlock(int nUserID, StreamType nStreamType);
8583 
8594 
8596  public delegate void ErrorOccured(ClientErrorMsg clienterrormsg);
8597 
8603 
8606  public delegate void VoiceActivation(bool bVoiceActive);
8607 
8613 
8619  public delegate void HotKeyToggle(int nHotKeyID, bool bActive);
8620 
8630 
8635  public delegate void HotKeyTest(int nVkCode, bool bActive);
8636 
8653  public event HotKeyTest OnHotKeyTest;
8654 
8658  public delegate void FileTransferUpdate(FileTransfer filetransfer);
8659 
8672 
8682  public delegate void DesktopTransferUpdate(int nSessionID, int nBytesRemain);
8683 
8694 
8696  public delegate void StreamMediaFile(MediaFileInfo mediafileinfo);
8697 
8703 
8705  public delegate void LocalMediaFile(MediaFileInfo mediafileinfo);
8706 
8712 
8714  public delegate void AudioInput(AudioInputProgress aip);
8715 
8720  public event AudioInput OnAudioInput;
8721 
8724  //TTDLL instance
8725  private IntPtr m_ttInst;
8726  //TTDLL event handler
8727  c_tt.MyEventHandler m_eventhandler;
8728  }
8729 
8738  public class TeamTalk5 : TeamTalkBase
8739  {
8740  public const int DEFAULT_TCPPORT = 10333;
8741  public const int DEFAULT_UDPPORT = 10333;
8742 
8744  public TeamTalk5(bool poll_based)
8745  : base(poll_based)
8746  {
8747  }
8748  }
8749 
8756  {
8757  public const int DEFAULT_TCPPORT = 10443;
8758  public const int DEFAULT_UDPPORT = 10443;
8759 
8761  public TeamTalk5Pro(bool poll_based)
8762  : base(poll_based)
8763  {
8764  }
8765  }
8774  public enum TTKeyTranslate : uint
8775  {
8777  TTKEY_NO_TRANSLATE = 0,
8791  }
8792 
8814  public enum MixerControl : uint
8815  {
8817  WAVEOUT_WAVE,
8819 
8821  WAVEIN_LINEIN,
8823  }
8824 
8828  public class WindowsMixer
8829  {
8836  public static int GetMixerCount()
8837  {
8838  return TTDLL.TT_Mixer_GetMixerCount();
8839  }
8846  public static bool GetMixerName(int nMixerIndex,
8847  ref string szMixerName)
8848  {
8849  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8850  bool b = TTDLL.TT_Mixer_GetMixerName(nMixerIndex, ptr);
8851  if(b)
8852  szMixerName = Marshal.PtrToStringUni(ptr);
8853 
8854  Marshal.FreeHGlobal(ptr);
8855  return b;
8856  }
8864  public static bool GetWaveInName(int nWaveDeviceID,
8865  ref string szMixerName)
8866  {
8867  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8868  bool b = TTDLL.TT_Mixer_GetWaveInName(nWaveDeviceID, ptr);
8869  if(b)
8870  szMixerName = Marshal.PtrToStringUni(ptr);
8871  Marshal.FreeHGlobal(ptr);
8872  return b;
8873  }
8881  public static bool GetWaveOutName(int nWaveDeviceID,
8882  ref string szMixerName)
8883  {
8884  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8885  bool b = TTDLL.TT_Mixer_GetWaveOutName(nWaveDeviceID, ptr);
8886  if(b)
8887  szMixerName = Marshal.PtrToStringUni(ptr);
8888 
8889  Marshal.FreeHGlobal(ptr);
8890  return b;
8891  }
8892 
8903  public static bool SetWaveOutMute(int nWaveDeviceID, MixerControl nControl, bool bMute)
8904  {
8905  return TTDLL.TT_Mixer_SetWaveOutMute(nWaveDeviceID, nControl, bMute);
8906  }
8916  public static int GetWaveOutMute(int nWaveDeviceID, MixerControl nControl)
8917  {
8918  return TTDLL.TT_Mixer_GetWaveOutMute(nWaveDeviceID, nControl);
8919  }
8928  public static bool SetWaveOutVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
8929  {
8930  return TTDLL.TT_Mixer_SetWaveOutVolume(nWaveDeviceID, nControl, nVolume);
8931  }
8940  public static int GetWaveOutVolume(int nWaveDeviceID, MixerControl nControl)
8941  {
8942  return TTDLL.TT_Mixer_GetWaveOutVolume(nWaveDeviceID, nControl);
8943  }
8951  public static bool SetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
8952  {
8953  return TTDLL.TT_Mixer_SetWaveInSelected(nWaveDeviceID, nControl);
8954  }
8963  public static int GetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
8964  {
8965  return TTDLL.TT_Mixer_GetWaveInSelected(nWaveDeviceID, nControl);
8966  }
8975  public static bool SetWaveInVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
8976  {
8977  return TTDLL.TT_Mixer_SetWaveInVolume(nWaveDeviceID, nControl, nVolume);
8978  }
8987  public static int GetWaveInVolume(int nWaveDeviceID, MixerControl nControl)
8988  {
8989  return TTDLL.TT_Mixer_GetWaveInVolume(nWaveDeviceID, nControl);
8990  }
8997  public static bool SetWaveInBoost(int nWaveDeviceID, bool bEnable)
8998  {
8999  return TTDLL.TT_Mixer_SetWaveInBoost(nWaveDeviceID, bEnable);
9000  }
9007  public static int GetWaveInBoost(int nWaveDeviceID)
9008  {
9009  return TTDLL.TT_Mixer_GetWaveInBoost(nWaveDeviceID);
9010  }
9017  public static bool SetWaveInMute(int nWaveDeviceID, bool bEnable)
9018  {
9019  return TTDLL.TT_Mixer_SetWaveInMute(nWaveDeviceID, bEnable);
9020  }
9027  public static int GetWaveInMute(int nWaveDeviceID)
9028  {
9029  return TTDLL.TT_Mixer_GetWaveInMute(nWaveDeviceID);
9030  }
9039  public static int GetWaveInControlCount(int nWaveDeviceID)
9040  {
9041  return TTDLL.TT_Mixer_GetWaveInControlCount(nWaveDeviceID);
9042  }
9053  public static bool GetWaveInControlName(int nWaveDeviceID, int nControlIndex,
9054  ref string szDeviceName)
9055  {
9056  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
9057  bool b = TTDLL.TT_Mixer_GetWaveInControlName(nWaveDeviceID, nControlIndex, ptr);
9058  if(b)
9059  szDeviceName = Marshal.PtrToStringUni(ptr);
9060  Marshal.FreeHGlobal(ptr);
9061  return b;
9062  }
9072  public static bool SetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
9073  {
9074  return TTDLL.TT_Mixer_SetWaveInControlSelected(nWaveDeviceID, nControlIndex);
9075  }
9085  public static bool GetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
9086  {
9087  return TTDLL.TT_Mixer_GetWaveInControlSelected(nWaveDeviceID, nControlIndex);
9088  }
9089  }
9098  public class WindowsFirewall
9099  {
9105  public static bool IsEnabled()
9106  {
9107  return TTDLL.TT_Firewall_IsEnabled();
9108  }
9118  public static bool Enable(bool bEnable)
9119  {
9120  return TTDLL.TT_Firewall_Enable(bEnable);
9121  }
9128  public static bool AppExceptionExists(string szExecutable)
9129  {
9130  return TTDLL.TT_Firewall_AppExceptionExists(szExecutable);
9131  }
9141  public static bool AddAppException(string szName, string szExecutable)
9142  {
9143  return TTDLL.TT_Firewall_AddAppException(szName, szExecutable);
9144  }
9154  public static bool RemoveAppException(string szExecutable)
9155  {
9156  return TTDLL.TT_Firewall_RemoveAppException(szExecutable);
9157  }
9158  }
9164  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
9165  public struct ShareWindow
9166  {
9168  public IntPtr hWnd;
9170  public int nWndX;
9172  public int nWndY;
9174  public int nWidth;
9176  public int nHeight;
9178  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
9179  public string szWindowTitle;
9180  }
9181 
9185  public class WindowsHelper
9186  {
9189  public static System.IntPtr GetDesktopActiveHWND()
9190  {
9191  return TTDLL.TT_Windows_GetDesktopActiveHWND();
9192  }
9193 
9195  public static System.IntPtr GetDesktopHWND()
9196  {
9197  return TTDLL.TT_Windows_GetDesktopHWND();
9198  }
9199 
9201  public static bool GetDesktopWindowHWND(int nIndex,
9202  ref System.IntPtr lpHWnd)
9203  {
9204  return TTDLL.TT_Windows_GetDesktopWindowHWND(nIndex, ref lpHWnd);
9205  }
9206 
9209  public static bool GetWindow(System.IntPtr hWnd,
9210  ref ShareWindow lpShareWindow)
9211  {
9212  return TTDLL.TT_Windows_GetWindow(hWnd, ref lpShareWindow);
9213  }
9214 
9234  public static int DesktopInputKeyTranslate(TTKeyTranslate nTranslate,
9235  DesktopInput[] lpDesktopInputs,
9236  out DesktopInput[] lpTranslatedDesktopInputs)
9237  {
9238  lpTranslatedDesktopInputs = new DesktopInput[lpDesktopInputs.Length];
9239  return TTDLL.TT_DesktopInput_KeyTranslate(nTranslate, lpDesktopInputs,
9240  lpTranslatedDesktopInputs,
9241  lpDesktopInputs.Length);
9242  }
9243 
9264  public static int DesktopInputExecute(DesktopInput[] lpDesktopInputs)
9265  {
9266  return TTDLL.TT_DesktopInput_Execute(lpDesktopInputs, lpDesktopInputs.Length);
9267  }
9268 
9269  }
9270 }
Class used to load TeamTalk5.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Standard Edition...
Definition: TeamTalk.cs:8739
TeamTalk5(bool poll_based)
Simply calls TeamTalkBase.TeamTalkBase()
Definition: TeamTalk.cs:8744
const int DEFAULT_TCPPORT
Definition: TeamTalk.cs:8740
const int DEFAULT_UDPPORT
Definition: TeamTalk.cs:8741
Class used to load TeamTalk5Pro.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Professional ...
Definition: TeamTalk.cs:8756
const int DEFAULT_UDPPORT
Definition: TeamTalk.cs:8758
const int DEFAULT_TCPPORT
Definition: TeamTalk.cs:8757
TeamTalk5Pro(bool poll_based)
Simply calls TeamTalkBase.TeamTalkBase()
Definition: TeamTalk.cs:8761
Abstract class which encapsulates the TeamTalk 5 client. Instantiate either BearWare....
Definition: TeamTalk.cs:4179
bool DBG_WriteAudioFileTone(MediaFileInfo lpMediaFileInfo, int nFrequency)
Definition: TeamTalk.cs:8229
bool DBG_SetSoundInputTone(StreamType uStreamTypes, int nFrequency)
Definition: TeamTalk.cs:8223
A wrapper for the Windows Firewall API.
Definition: TeamTalk.cs:9099
static bool Enable(bool bEnable)
Enable/disable the Windows Firewall.
Definition: TeamTalk.cs:9118
static bool RemoveAppException(string szExecutable)
Remove an application from the Windows Firewall exception list.
Definition: TeamTalk.cs:9154
static bool IsEnabled()
Check if the Windows Firewall is currently enabled.
Definition: TeamTalk.cs:9105
static bool AddAppException(string szName, string szExecutable)
Add an application to the Windows Firewall exception list.
Definition: TeamTalk.cs:9141
static bool AppExceptionExists(string szExecutable)
Check if an executable is already in the Windows Firewall exception list.
Definition: TeamTalk.cs:9128
Helper class for extracting Windows HWND handles and controlling mouse and keyboard.
Definition: TeamTalk.cs:9186
static bool GetWindow(System.IntPtr hWnd, ref ShareWindow lpShareWindow)
Get the properties of a window from its window handle (HWND).
Definition: TeamTalk.cs:9209
static bool GetDesktopWindowHWND(int nIndex, ref System.IntPtr lpHWnd)
Get the all the handles (HWND) of visible windows.
Definition: TeamTalk.cs:9201
static System.IntPtr GetDesktopActiveHWND()
Get the handle (HWND) of the window which is currently active (focused) on the Windows desktop.
Definition: TeamTalk.cs:9189
static int DesktopInputKeyTranslate(TTKeyTranslate nTranslate, DesktopInput[] lpDesktopInputs, out DesktopInput[] lpTranslatedDesktopInputs)
Translate platform key-code to and from TeamTalk's intermediate format.
Definition: TeamTalk.cs:9234
static int DesktopInputExecute(DesktopInput[] lpDesktopInputs)
Execute desktop (mouse or keyboard) input.
Definition: TeamTalk.cs:9264
static System.IntPtr GetDesktopHWND()
Get the handle (HWND) of the Windows desktop (full desktop).
Definition: TeamTalk.cs:9195
A wrapper for the Windows Mixer API.
Definition: TeamTalk.cs:8829
static bool SetWaveOutVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
Set the volume of a Windows Mixer Wave-Out device from the 'enum' of devices.
Definition: TeamTalk.cs:8928
static int GetWaveInVolume(int nWaveDeviceID, MixerControl nControl)
Get the volume of a Windows Mixer Wave-In device from the 'enum' of devices.
Definition: TeamTalk.cs:8987
static bool SetWaveOutMute(int nWaveDeviceID, MixerControl nControl, bool bMute)
Mute or unmute a Windows Mixer Wave-Out device from the 'enum' of devices.
Definition: TeamTalk.cs:8903
static bool GetWaveOutName(int nWaveDeviceID, ref string szMixerName)
Get the name of the mixer associated with a wave-out device.
Definition: TeamTalk.cs:8881
static bool SetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
Set the selected state of a Wave-In device in the Windows Mixer.
Definition: TeamTalk.cs:9072
static bool SetWaveInBoost(int nWaveDeviceID, bool bEnable)
Enable and disable microphone boost.
Definition: TeamTalk.cs:8997
static bool GetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
Get the selected state of a Wave-In device in the Windows Mixer.
Definition: TeamTalk.cs:9085
static bool GetWaveInName(int nWaveDeviceID, ref string szMixerName)
Get the name of the mixer associated with a wave-in device.
Definition: TeamTalk.cs:8864
static bool SetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
Set the selected state of a Windows Mixer Wave-In device from the 'enum' of devices.
Definition: TeamTalk.cs:8951
static int GetWaveInBoost(int nWaveDeviceID)
See if microphone boost is enabled.
Definition: TeamTalk.cs:9007
static bool SetWaveInMute(int nWaveDeviceID, bool bEnable)
Mute/unmute microphone input.
Definition: TeamTalk.cs:9017
static int GetMixerCount()
Get the number of Windows Mixers available.
Definition: TeamTalk.cs:8836
static int GetWaveOutVolume(int nWaveDeviceID, MixerControl nControl)
Get the volume of a Windows Mixer Wave-Out device from the 'enum' of devices.
Definition: TeamTalk.cs:8940
static bool SetWaveInVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
Set the volume of a Windows Mixer Wave-In device from the 'enum' of devices.
Definition: TeamTalk.cs:8975
static int GetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
Get the selected state of a Windows Mixer Wave-In device from the 'enum' of devices.
Definition: TeamTalk.cs:8963
static int GetWaveInMute(int nWaveDeviceID)
See if microphone is muted.
Definition: TeamTalk.cs:9027
static int GetWaveInControlCount(int nWaveDeviceID)
Get the number of Windows Mixer Wave-In devices.
Definition: TeamTalk.cs:9039
static int GetWaveOutMute(int nWaveDeviceID, MixerControl nControl)
Get the mute state of a Windows Mixer Wave-Out device from the 'enum' of devices.
Definition: TeamTalk.cs:8916
static bool GetWaveInControlName(int nWaveDeviceID, int nControlIndex, ref string szDeviceName)
Get the name of the Wave-In device with the specified index.
Definition: TeamTalk.cs:9053
static bool GetMixerName(int nMixerIndex, ref string szMixerName)
Get the name of a Windows Mixer based on its name.
Definition: TeamTalk.cs:8846
int GetRootChannelID()
Get the root channel's ID.
Definition: TeamTalk.cs:7542
const int TT_TRANSMITUSERS_STREAMTYPE_INDEX
Definition: TeamTalk.cs:4236
FileTransferStatus
Status of a file transfer.
Definition: TeamTalk.cs:2770
bool GetChannelFile(int nChannelID, int nFileID, ref RemoteFile lpRemoteFile)
Get information about a file which can be downloaded.
Definition: TeamTalk.cs:7637
const int TT_TRANSMITQUEUE_MAX
Definition: TeamTalk.cs:4280
int ChannelID
Same as GetMyChannelID().
Definition: TeamTalk.cs:7559
const int TT_CLASSROOM_STREAMTYPE_INDEX
Definition: TeamTalk.cs:4224
const int TT_CLASSROOM_FREEFORALL
Definition: TeamTalk.cs:4216
int GetChannelIDFromPath(string szChannelPath)
Get the channel ID of the supplied path. Channels are separated by '/'.
Definition: TeamTalk.cs:7592
const int TT_TRANSMITUSERS_USERID_INDEX
Definition: TeamTalk.cs:4232
ChannelType
The types of channels supported.
Definition: TeamTalk.cs:2531
bool IsChannelOperator(int nUserID, int nChannelID)
Check whether user is operator of a channel.
Definition: TeamTalk.cs:7647
int GetMyChannelID()
Get the channel which the local client instance is currently participating in.
Definition: TeamTalk.cs:7552
bool GetServerChannels(out Channel[] lpChannels)
Get all the channels on the server.
Definition: TeamTalk.cs:7657
bool GetChannelUsers(int nChannelID, out User[] lpUsers)
Get the IDs of all users in a channel.
Definition: TeamTalk.cs:7604
bool GetChannel(int nChannelID, ref Channel lpChannel)
Get the channel with a specific ID.
Definition: TeamTalk.cs:7567
const int TT_CLASSROOM_USERID_INDEX
Definition: TeamTalk.cs:4220
const int TT_TRANSMITUSERS_FREEFORALL
Definition: TeamTalk.cs:4228
bool GetChannelPath(int nChannelID, ref string szChannelPath)
Get the channel's path. Channels are separated by '/'.
Definition: TeamTalk.cs:7577
bool GetChannelFiles(int nChannelID, out RemoteFile[] lpRemoteFiles)
Get the list of the files in a channel which can be downloaded.
Definition: TeamTalk.cs:7621
const int TT_TRANSMITUSERS_MAX
The maximum number of users allowed to transmit when a BearWare.Channel is configured with ChannelTyp...
Definition: TeamTalk.cs:4207
bool CancelFileTranfer(int nTransferID)
Cancel an active file transfer.
Definition: TeamTalk.cs:8102
bool GetFileTransferInfo(int nTransferID, ref FileTransfer lpFileTransfer)
Get information about an active file transfer.
Definition: TeamTalk.cs:8089
@ FILETRANSFER_ACTIVE
File transfer active.
@ FILETRANSFER_FINISHED
File transfer finished.
@ FILETRANSFER_ERROR
Error during file transfer.
@ CHANNEL_NO_VOICEACTIVATION
Don't allow voice transmission if it's trigged by voice activation.
@ CHANNEL_PERMANENT
A channel which persists even when the last user leaves the channel.
@ CHANNEL_OPERATOR_RECVONLY
Only channel operators (and administrators) will receive audio/video/desktop transmissions....
@ CHANNEL_DEFAULT
A default channel is a channel which disappears after the last user leaves the channel.
@ CHANNEL_CLASSROOM
Voice and video transmission in the channel is controlled by a channel operator.
@ CHANNEL_NO_RECORDING
Don't allow recording to files in the channel.
@ CHANNEL_SOLO_TRANSMIT
Only one user can transmit at a time.
@ CHANNEL_HIDDEN
Hidden channel which can only be seen with UserRight.USERRIGHT_VIEW_HIDDEN_CHANNELS.
Codec
The codecs supported.
Definition: TeamTalk.cs:1544
AudioPreprocessorType
The types of supported audio preprocessors.
Definition: TeamTalk.cs:1452
@ WEBM_VP8_CODEC
WebM video codec.
@ SPEEX_VBR_CODEC
Speex audio codec in VBR mode, http://www.speex.org.
@ NO_CODEC
No codec specified.
@ SPEEX_CODEC
Speex audio codec, http://www.speex.org.
@ OPUS_CODEC
OPUS audio codec.
@ SPEEXDSP_AUDIOPREPROCESSOR
Use the BearWare.SpeexDSP audio preprocessor.
@ WEBRTC_AUDIOPREPROCESSOR
Use WebRTC's audio preprocessor from BearWare.WebRTCAudioPreprocessor. https://webrtc....
@ TEAMTALK_AUDIOPREPROCESSOR
Use TeamTalk's internal audio preprocessor BearWare.TTAudioPreprocessor.
@ NO_AUDIOPREPROCESSOR
Value for specifying that no audio preprocessing should occur.
int DoRecvFile(int nChannelID, int nFileID, string szLocalFilePath)
Download a file from the specified channel.
Definition: TeamTalk.cs:7007
int DoPing()
Ping server and wait for server to reply.
Definition: TeamTalk.cs:6633
int DoJoinChannel(Channel lpChannel)
Create a new channel and join it.
Definition: TeamTalk.cs:6744
int DoListBans(int nChannelID, int nIndex, int nCount)
Issue a command to list the banned users.
Definition: TeamTalk.cs:7435
int DoUnBanUser(string szIPAddress, int nChannelID)
Unban the user with the specified IP-address.
Definition: TeamTalk.cs:7396
int DoMoveUser(int nUserID, int nChannelID)
Issue command to move a user from one channel to another.
Definition: TeamTalk.cs:7180
int DoBanUser(int nUserID, int nChannelID)
Issue a ban command on a user in a specific channel.
Definition: TeamTalk.cs:7307
int DoChannelOpEx(int nUserID, int nChannelID, string szOpPassword, bool bMakeOperator)
Make another user operator of a channel using the szOpPassword of BearWare.Channel.
Definition: TeamTalk.cs:6907
int DoBanUserEx(int nUserID, BanType uBanTypes)
Ban the user with nUserID using the ban types specified.
Definition: TeamTalk.cs:7323
int DoChangeStatus(int nStatusMode, string szStatusMessage)
Change the client instance's currect status.
Definition: TeamTalk.cs:6838
int DoSendFile(int nChannelID, string szLocalFilePath)
Send a file to the specified channel.
Definition: TeamTalk.cs:6974
int DoLogin(string szNickname, string szUsername, string szPassword)
Same as DologinEx() but without the option to specify szClientName. Kept for backwards compatibility.
Definition: TeamTalk.cs:6649
int DoChannelOp(int nUserID, int nChannelID, bool bMakeOperator)
Make another user operator of a channel.
Definition: TeamTalk.cs:6884
int DoDeleteUserAccount(string szUsername)
Issue command to delete a user account on the server.
Definition: TeamTalk.cs:7276
int DoUnsubscribe(int nUserID, Subscription uSubscriptions)
Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific us...
Definition: TeamTalk.cs:7070
int DoQueryServerStats()
Get the server's current statistics.
Definition: TeamTalk.cs:7476
int DoMakeChannel(Channel lpChannel)
Make a new channel on the server.
Definition: TeamTalk.cs:7099
int DoKickUser(int nUserID, int nChannelID)
Kick user from either channel or server.
Definition: TeamTalk.cs:6936
int DoSaveConfig()
Save the server's current state to its settings file (typically the server's .xml file).
Definition: TeamTalk.cs:7456
int DoDeleteFile(int nChannelID, int nFileID)
Delete a file from a channel.
Definition: TeamTalk.cs:7033
int DoQuit()
Quit from server.
Definition: TeamTalk.cs:7492
int DoUpdateChannel(Channel lpChannel)
Update a channel's properties.
Definition: TeamTalk.cs:7135
int DoLeaveChannel()
Leave the current channel.
Definition: TeamTalk.cs:6794
int DoUnBanUserEx(BannedUser lpBannedUser)
Unban the properties specified in BearWare.BannedUser.
Definition: TeamTalk.cs:7410
int DoNewUserAccount(UserAccount lpUserAccount)
Issue command to create a new user account on the server.
Definition: TeamTalk.cs:7254
int DoSubscribe(int nUserID, Subscription uSubscriptions)
Subscribe to user events and/or data.
Definition: TeamTalk.cs:7051
int DoBanIPAddress(string szIPAddress, int nChannelID)
Issue a ban command on an IP-address user.
Definition: TeamTalk.cs:7371
int DoLoginEx(string szNickname, string szUsername, string szPassword, string szClientName)
Logon to a server.
Definition: TeamTalk.cs:6683
int DoBan(BannedUser lpBannedUser)
Ban the properties specified in lpBannedUser.
Definition: TeamTalk.cs:7346
int DoJoinChannelByID(int nChannelID, string szPassword)
Join an existing channel.
Definition: TeamTalk.cs:6771
int DoLogout()
Logout of the server.
Definition: TeamTalk.cs:6701
int DoChangeNickname(string szNewNick)
Change the client instance's nick name.
Definition: TeamTalk.cs:6815
int DoListUserAccounts(int nIndex, int nCount)
Issue command to list user accounts on the server.
Definition: TeamTalk.cs:7228
int DoUpdateServer(ServerProperties lpServerProperties)
Update server properties.
Definition: TeamTalk.cs:7200
int DoRemoveChannel(int nChannelID)
Remove a channel from a server.
Definition: TeamTalk.cs:7157
int DoTextMessage(TextMessage lpTextMessage)
Send a text message to either a user or a channel.
Definition: TeamTalk.cs:6860
bool Connect(string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
Connect to a server.
Definition: TeamTalk.cs:6471
bool SetClientKeepAlive(ClientKeepAlive lpClientKeepAlive)
Update the client instance's default keep alive settings.
Definition: TeamTalk.cs:6596
bool ConnectSysID(string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted, string szSystemID)
Same as Connect() but the option of providing a unique system-ID.
Definition: TeamTalk.cs:6505
bool GetClientStatistics(ref ClientStatistics lpClientStatistics)
Retrieve client statistics of bandwidth usage and response times.
Definition: TeamTalk.cs:6577
bool QueryMaxPayload(int nUserID)
Query the maximum size of UDP data packets to the user or server.
Definition: TeamTalk.cs:6568
bool ConnectEx(string szHostAddress, int nTcpPort, int nUdpPort, string szBindIPAddr, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
Bind to specific IP-address prior to connecting to server.
Definition: TeamTalk.cs:6538
bool SetEncryptionContext(EncryptionContext lpEncryptionContext)
Setup encryption properties prior to Connect().
Definition: TeamTalk.cs:6438
bool Disconnect()
Disconnect from the server.
Definition: TeamTalk.cs:6555
bool GetClientKeepAlive(ref ClientKeepAlive lpClientKeepAlive)
Get the client instance's current keep alive settings.
Definition: TeamTalk.cs:6607
const ushort DESKTOPINPUT_MOUSEPOS_IGNORE
Definition: TeamTalk.cs:864
DesktopWindow AcquireUserDesktopWindowEx(int nUserID, BitmapFormat nBitmapFormat)
Same as TeamTalkBase.AcquireUserDesktopWindow() except an extra option for converting bitmap to a dif...
Definition: TeamTalk.cs:6398
int SendDesktopWindow(DesktopWindow lpDesktopWindow, BitmapFormat nConvertBmpFormat)
Transmit a desktop window (bitmap) to users in the same channel.
Definition: TeamTalk.cs:6177
const uint DESKTOPINPUT_KEYCODE_IGNORE
Definition: TeamTalk.cs:855
TTKeyTranslate
Translate to and from TeamTalk's intermediate key-codes (TTKEYCODE).
Definition: TeamTalk.cs:8775
DesktopKeyState
The state of a key (or mouse button), i.e. if it's pressed or released.
Definition: TeamTalk.cs:791
DesktopWindow AcquireUserDesktopWindow(int nUserID)
Get a user's desktop window (bitmap image).
Definition: TeamTalk.cs:6382
bool PaintDesktopWindow(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight)
Paint user's desktop window using a Windows' DC (device context).
Definition: TeamTalk.cs:6254
int SendDesktopWindowFromHWND(System.IntPtr hWnd, BitmapFormat nBitmapFormat, DesktopProtocol nDesktopProtocol)
Transmit the specified window in a desktop session.
Definition: TeamTalk.cs:6233
const uint DESKTOPINPUT_KEYCODE_LMOUSEBTN
Definition: TeamTalk.cs:872
DesktopProtocol
The protocols supported for transferring a BearWare.DesktopWindow.
Definition: TeamTalk.cs:747
bool PaintDesktopWindowEx(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight)
Paint user's desktop window using a Windows' DC (device context).
Definition: TeamTalk.cs:6296
const uint DESKTOPINPUT_KEYCODE_RMOUSEBTN
Definition: TeamTalk.cs:880
bool CloseDesktopWindow()
Close the current desktop session.
Definition: TeamTalk.cs:6190
const int TT_DESKTOPINPUT_MAX
Definition: TeamTalk.cs:4290
bool SendDesktopInput(int nUserID, DesktopInput[] lpDesktopInputs)
Send a mouse or keyboard event to a shared desktop window.
Definition: TeamTalk.cs:6353
bool ReleaseUserDesktopWindow(DesktopWindow lpDesktopWindow)
Release memory allocated by the BearWare.DesktopWindow.
Definition: TeamTalk.cs:6411
BitmapFormat
The bitmap format used for a BearWare.DesktopWindow.
Definition: TeamTalk.cs:720
const uint DESKTOPINPUT_KEYCODE_MMOUSEBTN
Definition: TeamTalk.cs:888
bool SendDesktopCursorPosition(ushort nPosX, ushort nPosY)
Send the position of mouse cursor to users in the same channel.
Definition: TeamTalk.cs:6324
static System.Drawing.Color Palette_GetColorTable(BitmapFormat nBmpPalette, int nIndex)
Get RGB values of the palette for the bitmap format.
Definition: TeamTalk.cs:6211
@ TTKEY_MACKEYCODE_TO_TTKEYCODE
Translate from Mac OS X Carbon kVK_* key-code to TTKEYCODE. The Mac OS X key-codes are defined in Car...
@ TTKEY_TTKEYCODE_TO_WINKEYCODE
Translate from TTKEYCODE to Windows scan-code.
@ TTKEY_WINKEYCODE_TO_TTKEYCODE
Translate from Windows scan-code to TTKEYCODE. The Windows scan-code can be retrieved in Windows' WM_...
@ TTKEY_TTKEYCODE_TO_MACKEYCODE
Translate from TTKEYCODE to Mac OS X Carbon kVK_* key-code.
@ TTKEY_NO_TRANSLATE
Perform no translation.
@ DESKTOPKEYSTATE_DOWN
The key is pressed.
@ DESKTOPKEYSTATE_NONE
The key is ignored.
@ DESKTOPKEYSTATE_UP
The key is released.
@ DESKTOPPROTOCOL_ZLIB_1
Desktop protocol based on ZLIB for image compression and UDP for data transmission.
@ BMP_RGB8_PALETTE
The bitmap is a 256-colored bitmap requiring a palette. The default 256 colored palette is the Netsca...
@ BMP_RGB24
The bitmap is a 24-bit colored bitmap. The maximum size of a 24-bit bitmap is 4095 blocks of 85 by 16...
@ BMP_RGB32
The bitmap is a 32-bit colored bitmap. The maximum size of a 32-bit bitmap is 4095 blocks of 51 by 20...
@ BMP_NONE
Used to denote nothing selected.
@ BMP_RGB16_555
The bitmap is a 16-bit colored bitmap. The maximum pixels.
static string GetErrorMessage(ClientError nError)
Get textual discription of an error message.
Definition: TeamTalk.cs:8117
ClientError
Errors which can occur either as a result of client commands or as a result of internal errors.
Definition: TeamTalk.cs:3039
@ CMDERR_CHANNEL_ALREADY_EXISTS
Channel already exists.
@ CMDERR_MAX_DISKUSAGE_EXCEEDED
Cannot upload file because disk quota will be exceeded.
@ CMDERR_BAN_NOT_FOUND
Banned IP-address does not exist.
@ CMDERR_MISSING_PARAMETER
Command cannot be performed due to missing parameter. Only used internally.
@ INTERR_SNDEFFECT_FAILURE
BearWare.SoundDeviceEffects failed to initialize.
@ CMDERR_COMMAND_FLOOD
Command flooding prevented by server.
@ CMDERR_INCORRECT_OP_PASSWORD
Invalid password for becoming channel operator.
@ CMDERR_INCOMPATIBLE_PROTOCOLS
The server uses a protocol which is incompatible with the client instance.
@ CMDERR_CHANNEL_CANNOT_BE_HIDDEN
Cannot apply ChannelType.CHANNEL_HIDDEN to BearWare.Channel's channel type.
@ CMDERR_OPENFILE_FAILED
Server failed to open file.
@ CMDERR_CHANNEL_BANNED
Banned from joining a channel.
@ CMDERR_SUCCESS
Command indicating success.
@ CMDERR_ALREADY_LOGGEDIN
Already logged in.
@ INTERR_TTMESSAGE_QUEUE_OVERFLOW
BearWare.TTMessage event queue overflowed.
@ CMDERR_INCORRECT_CHANNEL_PASSWORD
Invalid channel password.
@ CMDERR_MAX_SERVER_USERS_EXCEEDED
Login failed due to maximum number of users on server.
@ INTERR_SNDOUTPUT_FAILURE
A sound output device failed.
@ INTERR_AUDIOPREPROCESSOR_INIT_FAILED
BearWare.AudioPreprocessor failed to initialize.
@ CMDERR_INVALID_USERNAME
Invalid username for BearWare.UserAccount.
@ CMDERR_USER_NOT_FOUND
User not found.
@ CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED
The selected BearWare.AudioCodec exceeds what the server allows.
@ INTERR_AUDIOCODEC_INIT_FAILED
Audio codec used by channel failed to initialize. Ensure the settings specified in BearWare....
@ CMDERR_FILE_ALREADY_EXISTS
File already exist.
@ CMDERR_MAX_CHANNEL_USERS_EXCEEDED
Cannot join channel because it has maximum number of users.
@ CMDERR_FILE_NOT_FOUND
File does not exist.
@ INTERR_SNDINPUT_FAILURE
A sound input device failed.
@ CMDERR_NOT_LOGGEDIN
Client instance has not been authenticated.
@ CMDERR_SERVER_BANNED
IP-address has been banned from server.
@ CMDERR_ACCOUNT_NOT_FOUND
Cannot find user account.
@ CMDERR_SYNTAX_ERROR
Command has syntax error. Only used internally.
@ CMDERR_CHANNEL_HAS_USERS
Cannot process command since channel is not empty.
@ CMDERR_FILETRANSFER_NOT_FOUND
File transfer doesn't exists.
@ CMDERR_UNKNOWN_COMMAND
The server doesn't support the issued command.
@ CMDERR_ALREADY_IN_CHANNEL
Cannot join same channel twice.
@ CMDERR_FILESHARING_DISABLED
Server does not allow file transfers.
@ CMDERR_INVALID_ACCOUNT
Invalid username or password for account.
@ CMDERR_MAX_CHANNELS_EXCEEDED
The maximum number of channels has been exceeded.
@ CMDERR_UNKNOWN_AUDIOCODEC
The server does not support the audio codec specified by the client. Introduced in version 4....
@ INTERR_SPEEXDSP_INIT_FAILED
Same as ClientError.INTERR_AUDIOPREPROCESSOR_INIT_FAILED.
@ CMDERR_MAX_LOGINS_PER_IPADDRESS_EXCEEDED
The maximum number of logins allowed per IP-address has been exceeded.
@ CMDERR_NOT_IN_CHANNEL
Cannot leave channel because not in channel.
@ CMDERR_CHANNEL_NOT_FOUND
Channel does not exist.
@ CMDERR_NOT_AUTHORIZED
Command not authorized.
@ CMDERR_LOGINSERVICE_UNAVAILABLE
The login service is currently unavailable.
@ CMDERR_INCORRECT_SERVER_PASSWORD
Invalid server password.
delegate void ServerStats(ServerStatistics serverstatistics)
Delegate for event OnCmdServerStatistics.
delegate void UserUpdate(User user)
Delegate for events OnCmdUserLoggedIn, OnCmdUserLoggedOut, OnCmdUserUpdate, OnCmdUserJoinedChannel an...
UserDesktopInput OnUserDesktopCursor
A user has sent the position of the mouse cursor.
Definition: TeamTalk.cs:8563
UserUpdate OnCmdUserJoinedChannel
A user has joined a channel.
Definition: TeamTalk.cs:8416
CommandProcessing OnCmdProcessing
A command issued by Do* methods is being processed.
Definition: TeamTalk.cs:8303
HotKeyTest OnHotKeyTest
A button was pressed or released on the user's keyboard or mouse.
Definition: TeamTalk.cs:8653
delegate void NewAudioBlock(int nUserID, StreamType nStreamType)
Delegate for event OnUserAudioBlock.
Connection OnConnectionLost
Connection to server has been lost.
Definition: TeamTalk.cs:8266
DesktopTransferUpdate OnDesktopWindowTransfer
Used for tracking when a desktop window has been transmitted to the server.
Definition: TeamTalk.cs:8693
delegate void UserRecordMediaFile(int nUserID, MediaFileInfo mediafileinfo)
Delegate for event OnUserRecordMediaFile.
CommandError OnCmdError
The server rejected a command issued by the local client instance.
Definition: TeamTalk.cs:8319
MaxPayloadUpdate OnConnectionMaxPayloadUpdated
The maximum size of the payload put into UDP packets has been updated.
Definition: TeamTalk.cs:8282
delegate void StreamMediaFile(MediaFileInfo mediafileinfo)
Delegate for event OnStreamMediaFile.
UserUpdate OnCmdUserUpdate
User changed properties.
Definition: TeamTalk.cs:8410
delegate void MyselfLoggedOut()
Delegate for event OnCmdMyselfLoggedOut.
delegate void CommandSuccess(int nCmdID)
Delegate for event CommandSuccess.
delegate void UserVideoFrame(int nUserID, int nStreamID)
A delegate for the event OnUserVideoCapture.
ChannelUpdate OnCmdChannelUpdate
A channel's properties has been updated.
Definition: TeamTalk.cs:8454
delegate void ErrorOccured(ClientErrorMsg clienterrormsg)
Delegate for event OnInternalError.
NewAudioBlock OnUserAudioBlock
A new audio block can be extracted.
Definition: TeamTalk.cs:8593
VoiceActivation OnVoiceActivation
Voice activation has triggered transmission.
Definition: TeamTalk.cs:8612
MyselfLoggedOut OnCmdMyselfLoggedOut
The client instance logged out of a server.
Definition: TeamTalk.cs:8361
MyselfLoggedIn OnCmdMyselfLoggedIn
The client instance successfully logged on to server.
Definition: TeamTalk.cs:8350
delegate void DesktopTransferUpdate(int nSessionID, int nBytesRemain)
Delegate for event OnDesktopWindowTransfer().
delegate void VoiceActivation(bool bVoiceActive)
Delegate for event OnVoiceActivation.
delegate void ServerUpdate(ServerProperties serverproperties)
Delegate for event OnCmdServerUpdate.
delegate void UserTextMessage(TextMessage textmessage)
Delegate for events OnCmdUserTextMessage.
HotKeyToggle OnHotKeyToggle
A hotkey has been acticated or deactivated.
Definition: TeamTalk.cs:8629
delegate void MyselfKicked(User user)
Delegate for event OnCmdMyselfKicked.
LocalMediaFile OnLocalMediaFile
Media file is being played locally.
Definition: TeamTalk.cs:8711
delegate void MaxPayloadUpdate(int nPayloadSize)
Delegate for event OnConnectionMaxPayloadUpdated().
UserTextMessage OnCmdUserTextMessage
A user has sent a text-message.
Definition: TeamTalk.cs:8435
delegate void ChannelUpdate(Channel channel)
Delegate for OnCmdChannelNew, OnCmdChannelUpdate and OnCmdChannelRemove.
delegate void HotKeyToggle(int nHotKeyID, bool bActive)
Delegate for event OnHotKeyToggle.
AudioInput OnAudioInput
Audio input progress as result of TeamTalkBase.InsertAudioBlock()
Definition: TeamTalk.cs:8720
Connection OnConnectionSuccess
Connected successfully to the server.
Definition: TeamTalk.cs:8250
UserUpdate OnCmdUserLoggedOut
A user logged out of the server.
Definition: TeamTalk.cs:8404
delegate void UserStreamUpdate(User user, int nStreamID)
Delegate for events OnUserFirstVoiceStreamPacket.
ErrorOccured OnInternalError
A internal error occured.
Definition: TeamTalk.cs:8602
CommandSuccess OnCmdSuccess
The server successfully processed a command issued by the local client instance.
Definition: TeamTalk.cs:8333
StreamMediaFile OnStreamMediaFile
Media file being streamed to a channel is processing.
Definition: TeamTalk.cs:8702
delegate void UserDesktopInput(int nSrcUserID, DesktopInput desktopinput)
Delegate for event OnUserDesktopCursor().
delegate void HotKeyTest(int nVkCode, bool bActive)
Delegate for event OnHotKeyTest.
MyselfKicked OnCmdMyselfKicked
The client instance was kicked from a channel.
Definition: TeamTalk.cs:8374
UserVideoFrame OnUserMediaFileVideo
A new video frame was received from a user.
Definition: TeamTalk.cs:8533
UserVideoFrame OnUserVideoCapture
A new video frame was received from a user.
Definition: TeamTalk.cs:8527
ChannelUpdate OnCmdChannelNew
A new channel has been created.
Definition: TeamTalk.cs:8448
delegate void FileTransferUpdate(FileTransfer filetransfer)
Delegate for event OnFileTransfer.
ListUserAccount OnCmdUserAccount
A new user account has been listed by the server. Event handler for ClientEvent.CLIENTEVENT_CMD_USERA...
Definition: TeamTalk.cs:8500
UserStreamUpdate OnUserFirstVoiceStreamPacket
The first voice packet of a new voice stream has been received.
Definition: TeamTalk.cs:8513
FileUpdate OnCmdFileNew
A new file is added to a channel.
Definition: TeamTalk.cs:8487
delegate void NewDesktopWindow(int nUserID, int nStreamID)
Delegate for event OnUserDesktopWindow.
delegate void CommandProcessing(int nCmdID, bool bActive)
Delegate for event OnCmdProcessing.
ListBannedUser OnCmdBannedUser
A new banned user has been listed by the server. Event handler for ClientEvent.CLIENTEVENT_CMD_BANNED...
Definition: TeamTalk.cs:8507
delegate void AudioInput(AudioInputProgress aip)
Delegate for event OnAudioInput.
ServerStats OnCmdServerStatistics
Server statistics available.
Definition: TeamTalk.cs:8478
UserUpdate OnUserStateChange
A user's state has been updated.
Definition: TeamTalk.cs:8518
delegate void ListBannedUser(BannedUser banneduser)
A delegate for event OnCmdUserAccount.
UserRecordMediaFile OnUserRecordMediaFile
An media file recording has changed status.
Definition: TeamTalk.cs:8579
delegate void LocalMediaFile(MediaFileInfo mediafileinfo)
Delegate for event OnLocalMediaFile.
delegate void CommandError(int nCmdID, ClientErrorMsg clienterrormsg)
Delegate for event OnCmdError.
delegate void FileUpdate(RemoteFile remotefile)
A delegate for events OnCmdFileNew and OnCmdFileRemove.
ClientEvent
TeamTalk client event messages.
Definition: TeamTalk.cs:3354
delegate void ListUserAccount(UserAccount useraccount)
A delegate for event OnCmdUserAccount.
NewDesktopWindow OnUserDesktopWindow
A new or updated desktop window has been received from a user.
Definition: TeamTalk.cs:8553
UserUpdate OnCmdUserLoggedIn
A new user logged on to the server.
Definition: TeamTalk.cs:8394
FileUpdate OnCmdFileRemove
A file has been removed from a channel.
Definition: TeamTalk.cs:8493
ServerUpdate OnCmdServerUpdate
Server has updated its settings (server name, MOTD, etc.)
Definition: TeamTalk.cs:8469
UserUpdate OnCmdUserLeftChannel
User has left a channel.
Definition: TeamTalk.cs:8422
FileTransferUpdate OnFileTransfer
A file transfer is processing.
Definition: TeamTalk.cs:8671
Connection OnConnectionFailed
Failed to connect to server.
Definition: TeamTalk.cs:8258
delegate void Connection()
Delegate for events OnConnectionSuccess, OnConnectionFailed and OnConnectionLost.
UserDesktopInput OnUserDesktopInput
Desktop input (mouse or keyboard input) has been received from a user.
Definition: TeamTalk.cs:8570
ChannelUpdate OnCmdChannelRemove
A channel has been removed. Event handler for ClientEvent.CLIENTEVENT_CMD_CHANNEL_REMOVE.
Definition: TeamTalk.cs:8459
delegate void MyselfLoggedIn(int nMyUserID, UserAccount useraccount)
Delegate for event OnCmdMyselfLoggedIn.
@ CLIENTEVENT_CMD_FILE_REMOVE
A file has been removed from a channel.
@ CLIENTEVENT_CMD_CHANNEL_UPDATE
A channel's properties has been updated.
@ CLIENTEVENT_USER_DESKTOPCURSOR
A user has sent the position of the mouse cursor.
@ CLIENTEVENT_STREAM_MEDIAFILE
Media file being streamed to a channel is processing.
@ CLIENTEVENT_CMD_SUCCESS
The server successfully processed a command issued by the local client instance.
@ CLIENTEVENT_CMD_MYSELF_KICKED
The client instance was kicked from a channel.
@ CLIENTEVENT_USER_STATECHANGE
A user state has changed.
@ CLIENTEVENT_CMD_MYSELF_LOGGEDOUT
The client instance logged out of the server.
@ CLIENTEVENT_FILETRANSFER
A file transfer is processing.
@ CLIENTEVENT_CMD_USER_JOINED
A user has joined a channel.
@ CLIENTEVENT_HOTKEY
A hotkey has been acticated or deactivated.
@ CLIENTEVENT_CMD_USER_UPDATE
User changed properties.
@ CLIENTEVENT_LOCAL_MEDIAFILE
Media file played locally is procesing.
@ CLIENTEVENT_HOTKEY_TEST
A button was pressed or released on the user's keyboard or mouse.
@ CLIENTEVENT_USER_AUDIOBLOCK
A new audio block can be extracted.
@ CLIENTEVENT_CON_MAX_PAYLOAD_UPDATED
The maximum size of the payload put into UDP packets has been updated.
@ CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET
The first voice packet of a new voice stream has been received.
@ CLIENTEVENT_CMD_SERVER_UPDATE
Server has updated its settings (server name, MOTD, etc.)
@ CLIENTEVENT_USER_MEDIAFILE_VIDEO
A new video frame from a video media file was received from a user.
@ CLIENTEVENT_CON_LOST
Connection to server has been lost.
@ CLIENTEVENT_CMD_FILE_NEW
A new file is added to a channel.
@ CLIENTEVENT_USER_DESKTOPINPUT
Desktop input (mouse or keyboard input) has been received from a user.
@ CLIENTEVENT_CMD_MYSELF_LOGGEDIN
The client instance successfully logged on to server.
@ CLIENTEVENT_CON_SUCCESS
Connected successfully to the server.
@ CLIENTEVENT_USER_RECORD_MEDIAFILE
A media file recording has changed status.
@ CLIENTEVENT_USER_DESKTOPWINDOW
A new or updated desktop window has been received from a user.
@ CLIENTEVENT_CMD_ERROR
The server rejected a command issued by the local client instance.
@ CLIENTEVENT_AUDIOINPUT
Progress is audio being injected as StreamType.STREAMTYPE_VOICE.
@ CLIENTEVENT_CMD_USER_LEFT
User has left a channel.
@ CLIENTEVENT_CMD_PROCESSING
A command issued by TeamTalkBase.Do* methods is being processed.
@ CLIENTEVENT_CMD_BANNEDUSER
A banned user has been received from the server.
@ CLIENTEVENT_CON_FAILED
Failed to connect to server.
@ CLIENTEVENT_CMD_CHANNEL_NEW
A new channel has been created.
@ CLIENTEVENT_CMD_SERVERSTATISTICS
Server statistics available.
@ CLIENTEVENT_USER_VIDEOCAPTURE
A new video frame from a video capture device was received from a user.
@ CLIENTEVENT_CMD_USERACCOUNT
A user account has been received from the server.
@ CLIENTEVENT_CMD_USER_TEXTMSG
A user has sent a text-message.
@ CLIENTEVENT_CMD_USER_LOGGEDOUT
A client logged out of the server.
@ CLIENTEVENT_INTERNAL_ERROR
An internal error occurred in the client instance.
@ CLIENTEVENT_CMD_USER_LOGGEDIN
A new user logged on to the server.
@ CLIENTEVENT_CMD_CHANNEL_REMOVE
A channel has been removed.
@ CLIENTEVENT_VOICE_ACTIVATION
Voice activation has triggered transmission.
@ CLIENTEVENT_DESKTOPWINDOW_TRANSFER
Used for tracking when a desktop window has been transmitted to the server.
bool HotKey_Register(int nHotKeyID, int[] lpnVKCodes)
Register a global hotkey.
Definition: TeamTalk.cs:8152
bool HotKey_GetKeyString(int nVKCode, ref string szKeyName)
Get a string description of the virtual-key code.
Definition: TeamTalk.cs:8212
int HotKey_IsActive(int nHotKeyID)
Check whether hotkey is active.
Definition: TeamTalk.cs:8170
bool HotKey_Unregister(int nHotKeyID)
Unregister a registered hotkey.
Definition: TeamTalk.cs:8161
bool HotKey_RemoveTestHook()
Remove the test hook again so the OnHotKeyTest event will no longer be notified.
Definition: TeamTalk.cs:8202
bool HotKey_InstallTestHook()
Install a test hook which calls the event OnHotKeyTest whenever a key or mouse button is pressed.
Definition: TeamTalk.cs:8183
bool GetMessage(ref TTMessage pMsg, int nWaitMs)
Poll for events in the client instance.
Definition: TeamTalk.cs:4432
const int TT_CHANNELID_MAX
The highest channel ID. Also used for TT_CLASSROOM_FREEFORALL.
Definition: TeamTalk.cs:4195
const int TT_LOCAL_USERID
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare....
Definition: TeamTalk.cs:4251
BearWare.ClientFlag GetFlags()
Get a bitmask describing the client's current state.
Definition: TeamTalk.cs:4477
const int TT_MUXED_USERID
User ID used to identify muxed audio that has been mixed into a single stream.
Definition: TeamTalk.cs:4269
TeamTalkBase(bool poll_based)
Create a new TeamTalk client instance.
Definition: TeamTalk.cs:4316
ClientFlag
Flags used to describe the the client instance current state.
Definition: TeamTalk.cs:4078
bool PumpMessage(ClientEvent nClientEvent, int nIdentifier)
Cause client instance event thread to schedule an update event.
Definition: TeamTalk.cs:4463
const int TT_USERID_MAX
The highest user ID.
Definition: TeamTalk.cs:4191
const int TT_LOCAL_TX_USERID
User ID passed to TeamTalkBase.EnableAudioBlockEvent() in order to receive BearWare....
Definition: TeamTalk.cs:4260
void ProcessMsg(TTMessage msg)
Event handler for BearWare.TTMessage.
Definition: TeamTalk.cs:4508
static string GetVersion()
Get the DLL's version number.
Definition: TeamTalk.cs:4304
ClientFlag Flags
Same as GetFlags().
Definition: TeamTalk.cs:4486
static bool SetLicenseInformation(string szRegName, string szRegKey)
Set license information to disable trial mode.
Definition: TeamTalk.cs:4499
const int TT_STRLEN
The maximum length of all strings used in TeamTalkBase. This value includes the zero terminator,...
Definition: TeamTalk.cs:4188
@ CLIENT_CLOSED
The client instance is in closed state, i.e. no operations has been performed on it.
@ CLIENT_VIDEOCAPTURE_READY
If set the client instance's video device has been initialized, i.e. TeamTalkBase....
@ CLIENT_CONNECTION
Helper for ClientFlag.CLIENT_CONNECTING and ClientFlag.CLIENT_CONNECTED to see if TeamTalkBase....
@ CLIENT_CONNECTED
If set the client instance is connected to a server, i.e. ClientEvent.CLIENTEVENT_CON_SUCCESS event h...
@ CLIENT_SNDINOUTPUT_DUPLEX
If set the client instance is running in sound duplex mode where multiple audio output streams are mi...
@ CLIENT_SNDOUTPUT_READY
If set the client instance's sound output device has been initialized, i.e. TeamTalkBase....
@ CLIENT_CONNECTING
If set the client instance is currently try to connect to a server, i.e. TeamTalkBase....
@ CLIENT_STREAM_VIDEO
If set the client is currently streaming the video of a media file. When streaming a video file the C...
@ CLIENT_MUX_AUDIOFILE
If set the client instance is currently muxing audio streams into a single file. This is enabled by c...
@ CLIENT_SNDOUTPUT_AUTO3DPOSITION
If set the client instance will auto position users in a 180 degree circle using 3D-sound....
@ CLIENT_DESKTOP_ACTIVE
If set the client instance current have an active desktop session, i.e. TeamTalkBase....
@ CLIENT_SNDINPUT_READY
If set the client instance's sound input device has been initialized, i.e. TeamTalkBase....
@ CLIENT_STREAM_AUDIO
If set the client is currently streaming the audio of a media file. When streaming a video file the C...
@ CLIENT_SNDINPUT_VOICEACTIVATED
If set the client instance will start transmitting audio if the sound level is above the voice activa...
@ CLIENT_TX_VOICE
If set the client instance is currently transmitting audio.
@ CLIENT_TX_VIDEOCAPTURE
If set the client instance is currently transmitting video.
@ CLIENT_SNDINPUT_VOICEACTIVE
If set GetSoundInputLevel() is higher than the voice activation level. To enable voice transmission i...
@ CLIENT_TX_DESKTOP
If set the client instance is currently transmitting a desktop window. A desktop window update is iss...
@ CLIENT_AUTHORIZED
If set the client instance is logged on to a server, i.e. got ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGG...
@ CLIENT_SNDOUTPUT_MUTE
If set the client instance has muted all users.
bool UpdateStreamingMediaFileToChannel(MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec)
Update active media file being streamed to channel.
Definition: TeamTalk.cs:5991
bool StartStreamingMediaFileToChannel(string szMediaFilePath, VideoCodec lpVideoCodec)
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Definition: TeamTalk.cs:5930
VideoFrame AcquireUserMediaVideoFrame(int nUserID, out Bitmap bmp)
Extract a user's media video frame for display.
Definition: TeamTalk.cs:6100
int InitLocalPlayback(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback)
Play media file using settings from TeamTalkBase instance.
Definition: TeamTalk.cs:6033
bool UpdateLocalPlayback(int nPlaybackSessionID, MediaFilePlayback lpMediaFilePlayback)
Definition: TeamTalk.cs:6049
bool StopLocalPlayback(int nPlaybackSessionID)
Definition: TeamTalk.cs:6063
bool StopStreamingMediaFileToChannel()
Stop streaming media file to channel.
Definition: TeamTalk.cs:6004
bool StartStreamingMediaFileToChannel(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec)
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Definition: TeamTalk.cs:5966
MediaFileStatus
Status of media file being written to disk.
Definition: TeamTalk.cs:519
static bool GetMediaFileInfo(string szMediaFilePath, ref MediaFileInfo lpMediaFileInfo)
Get the properties of a media file.
Definition: TeamTalk.cs:6075
bool ReleaseUserMediaVideoFrame(VideoFrame lpVideoFrame)
Delete a user's video frame, acquired through TeamTalkBase.AcquireUserMediaVideoFrame(),...
Definition: TeamTalk.cs:6122
const uint TT_MEDIAPLAYBACK_OFFSET_IGNORE
Definition: TeamTalk.cs:4300
AudioFileFormat
Media file formats supported for muxed audio recordings.
Definition: TeamTalk.cs:540
@ MFS_PLAYING
Playing media file with updated uElapsedMSec of BearWare.MediaFileInfo.
@ MFS_FINISHED
Finished processing media file.
@ MFS_STARTED
Started processing media file.
@ MFS_PAUSED
Paused processing of media file.
@ MFS_ERROR
Error while processing media file.
@ MFS_ABORTED
Aborted processing of media file.
@ AFF_MP3_16KBIT_FORMAT
Store in MP3-format.
@ AFF_WAVE_FORMAT
Store in PCM 16-bit wave format.
@ AFF_CHANNELCODEC_FORMAT
Store audio in the same format as the BearWare.Channel's configured audio codec.
@ AFF_NONE
Used to denote nothing selected.
MixerControl
The Windows mixer controls which can be queried by the BearWare.WindowsMixer class.
Definition: TeamTalk.cs:8815
UserRight
The rights users have once they have logged on to the server.
Definition: TeamTalk.cs:1722
ServerLogEvent
Events that are logged by the server, i.e. written to server's log file.
Definition: TeamTalk.cs:1809
bool GetServerUsers(out User[] lpUsers)
Get all the users on the server.
Definition: TeamTalk.cs:7521
bool GetServerProperties(ref ServerProperties lpServerProperties)
Get the server's properties.
Definition: TeamTalk.cs:7507
BanType
Way to ban a user from either login or joining a channel.
Definition: TeamTalk.cs:2023
@ USERRIGHT_TRANSMIT_DESKTOP
User is allowed to forward desktop packets through server.
@ USERRIGHT_MULTI_LOGIN
Allow multiple users to log on to the server with the same BearWare.UserAccount.
@ USERRIGHT_TRANSMIT_VOICE
Users are allowed to forward audio packets through server. TeamTalkBase.EnableVoiceTransmission()
@ USERRIGHT_CREATE_TEMPORARY_CHANNEL
User is allowed to create temporary channels which disappear when last user leaves the channel.
@ USERRIGHT_TRANSMIT_VIDEOCAPTURE
User is allowed to forward video packets through server. TeamTalkBase.StartVideoCaptureTransmission()
@ USERRIGHT_KICK_USERS
User can kick users off the server.
@ USERRIGHT_UPDATE_SERVERPROPERTIES
User can update server properties.
@ USERRIGHT_ALL
User with all rights.
@ USERRIGHT_LOCKED_NICKNAME
User's nick name is locked. TeamTalkBase.DoChangeNickname() cannot be used and TeamTalkBase....
@ USERRIGHT_TRANSMIT_MEDIAFILE
User is allowed to media files to channel.
@ USERRIGHT_BAN_USERS
User can add and remove banned users.
@ USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO
User is allowed to stream video files to channel.
@ USERRIGHT_TEXTMESSAGE_BROADCAST
User can broadcast text message of type TextMsgType.MSGTYPE_BROADCAST to all users.
@ USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO
User is allowed to stream audio files to channel.
@ USERRIGHT_OPERATOR_ENABLE
User can make other users channel operator.
@ USERRIGHT_TRANSMIT_DESKTOPINPUT
User is allowed to forward desktop input packets through server.
@ USERRIGHT_MOVE_USERS
User can move users from one channel to another.
@ USERRIGHT_LOCKED_STATUS
User's status is locked. TeamTalkBase.DoChangeStatus() cannot be used.
@ USERRIGHT_VIEW_ALL_USERS
User can see users in all other channels.
@ USERRIGHT_DOWNLOAD_FILES
User can download files from channels.
@ USERRIGHT_UPLOAD_FILES
User can upload files to channels.
@ USERRIGHT_VIEW_HIDDEN_CHANNELS
User can see hidden channels, ChannelType.CHANNEL_HIDDEN.
@ USERRIGHT_MODIFY_CHANNELS
User is allowed to create permanent channels which are stored in the server's configuration file.
@ USERRIGHT_RECORD_VOICE
User can record voice in all channels. Even channels with ChannelType.CHANNEL_NO_RECORDING.
@ USERRIGHT_NONE
Users who log onto the server has none of the rights below.
@ SERVERLOGEVENT_USER_MOVED
User was moved to another channel is logged to file by the server.
@ SERVERLOGEVENT_USER_LEFTCHANNEL
User left a channel is logged to file by the server.
@ SERVERLOGEVENT_USER_LOGGEDIN
User logged in is logged to file by the server.
@ SERVERLOGEVENT_USER_DISCONNECTED
User disconnected from server is logged to file by the server.
@ SERVERLOGEVENT_SERVER_SAVECONFIG
User saved server's configuration is logged to file by the server.
@ SERVERLOGEVENT_CHANNEL_REMOVED
User removed a channel is logged to file by the server.
@ SERVERLOGEVENT_FILE_DELETED
User deleted a file is logged to file by the server.
@ SERVERLOGEVENT_FILE_DOWNLOADED
User downloaded a file is logged to file by the server.
@ SERVERLOGEVENT_USER_KICKED
User was kicked is logged to file by the server.
@ SERVERLOGEVENT_USER_JOINEDCHANNEL
User joined a channel is logged to file by the server.
@ SERVERLOGEVENT_USER_TEXTMESSAGE_BROADCAST
User's broadcast text messages are logged to file by the server.
@ SERVERLOGEVENT_USER_TEXTMESSAGE_CHANNEL
User's channel text messages are logged to file by the server.
@ SERVERLOGEVENT_SERVER_UPDATED
User updated server's properties is logged to file by the server.
@ SERVERLOGEVENT_USER_CONNECTED
User's IP-address is logged to file by serer.
@ SERVERLOGEVENT_USER_TIMEDOUT
User disconnected due to connection timeout is logged to file by the server.
@ SERVERLOGEVENT_USER_LOGINFAILED
User failed to log in is logged to file by the server.
@ SERVERLOGEVENT_USER_LOGGEDOUT
User logged out is logged to file by the server.
@ SERVERLOGEVENT_NONE
Nothing is logged to file by server.
@ SERVERLOGEVENT_USER_TEXTMESSAGE_PRIVATE
User's private text messages are logged to file by the server.
@ SERVERLOGEVENT_CHANNEL_UPDATED
User updated a channel is logged to file by the server.
@ SERVERLOGEVENT_USER_BANNED
User was banned is logged to file by the server.
@ SERVERLOGEVENT_USER_UPDATED
User's status is logged to file by the server.
@ SERVERLOGEVENT_USER_UNBANNED
User was removed from ban list is logged to file by the server.
@ SERVERLOGEVENT_CHANNEL_CREATED
User created new channel is logged to file by the server.
@ SERVERLOGEVENT_FILE_UPLOADED
User uploaded a file is logged to file by the server.
@ SERVERLOGEVENT_USER_TEXTMESSAGE_CUSTOM
User's custom text messages are logged to file by the server.
@ BANTYPE_NONE
Ban type not set.
@ BANTYPE_CHANNEL
The ban applies to the channel specified in the szChannel of BearWare.BannedUser. Otherwise the ban a...
@ BANTYPE_USERNAME
Ban szUsername specified in BearWare.BannedUser.
@ BANTYPE_IPADDR
Ban szIPAddress specified in BearWare.BannedUser.
static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID, int nSampleRate, int nChannels, bool bDuplexMode, SpeexDSP lpSpeexDSP)
Perform a record and playback test of specified sound devices along with an audio configuration and a...
Definition: TeamTalk.cs:4760
bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars, AudioFileFormat uAFF)
Store user's audio to disk.
Definition: TeamTalk.cs:7957
bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars, AudioFileFormat uAFF, int nStopRecordingExtraDelayMSec)
Store user's audio to disk.
Definition: TeamTalk.cs:7987
bool Enable3DSoundPositioning(bool bEnable)
Enable automatically position users using 3D-sound.
Definition: TeamTalk.cs:5242
bool ReleaseUserAudioBlock(AudioBlock lpAudioBlock)
Release the shared memory of an BearWare.AudioBlock.
Definition: TeamTalk.cs:8066
bool SetSoundInputPreprocess(SpeexDSP lpSpeexDSP)
Enable sound preprocessor which should be used for processing audio recorded by the sound input devic...
Definition: TeamTalk.cs:5156
bool SetUserStereo(int nUserID, StreamType nStreamType, bool bLeftSpeaker, bool bRightSpeaker)
Set whether a user should speak in the left, right or both speakers. This function only works if Bear...
Definition: TeamTalk.cs:7918
bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes, AudioFormat lpAudioFormat, bool bEnable)
Same as TeamTalkBase.EnableAudioBlockEvent() but option to specify audio output format.
Definition: TeamTalk.cs:5356
bool CloseSoundDuplexDevices()
Shut down sound devices running in duplex mode.
Definition: TeamTalk.cs:5040
bool AutoPositionUsers()
Automatically position users using 3D-sound.
Definition: TeamTalk.cs:5255
bool SetSoundOutputVolume(int nVolume)
Set master volume.
Definition: TeamTalk.cs:5207
bool GetSoundDeviceEffects(ref SoundDeviceEffects lpSoundDeviceEffect)
Get the audio effects that are currently enabled.
Definition: TeamTalk.cs:5087
int GetSoundInputLevel()
Get the volume level of the current recorded audio.
Definition: TeamTalk.cs:5107
bool SetUserPosition(int nUserID, StreamType nStreamType, float x, float y, float z)
Set the position of a user.
Definition: TeamTalk.cs:7902
bool SetUserStoppedPlaybackDelay(int nUserID, StreamType nStreamType, int nDelayMSec)
Set the delay of when a user should no longer be considered as playing audio (either voice or audio f...
Definition: TeamTalk.cs:7832
const int TT_SAMPLERATES_MAX
Definition: TeamTalk.cs:4284
bool SetUserAudioStreamBufferSize(int nUserID, StreamType uStreamType, int nMSec)
Change the amount of media data which can be buffered in the user's playback queue.
Definition: TeamTalk.cs:8017
static bool GetSoundDevices(out SoundDevice[] lpSoundDevices)
Retrieve list of sound devices for recording and playback.
Definition: TeamTalk.cs:4728
static bool GetDefaultSoundDevicesEx(SoundSystem nSndSystem, ref int lpnInputDeviceID, ref int lpnOutputDeviceID)
Get the default sound devices for the specified sound system.
Definition: TeamTalk.cs:4714
bool GetUserJitterControl(int nUserID, StreamType nStreamType, ref JitterConfig lpJitterConfig)
Get the de-jitter configuration for a user.
Definition: TeamTalk.cs:7880
bool GetSoundInputPreprocess(ref SpeexDSP lpSpeexDSP)
Get the sound preprocessor settings which are currently in use for recorded sound input device (voice...
Definition: TeamTalk.cs:5169
AudioBlock AcquireUserAudioBlock(StreamType uStreamTypes, int nUserID)
Extract the raw audio associated with the event TeamTalkBase.OnUserAudioBlock().
Definition: TeamTalk.cs:8041
bool SetSoundOutputMute(bool bMuteAll)
Set all users mute.
Definition: TeamTalk.cs:5228
bool InitSoundOutputSharedDevice(int nSampleRate, int nChannels, int nFrameSize)
Setup sample rate, channels and frame size of shared sound output device.
Definition: TeamTalk.cs:4948
bool InitSoundDuplexDevices(int nInputDeviceID, int nOutputDeviceID)
Enable duplex mode where multiple audio streams are mixed into a single stream using software.
Definition: TeamTalk.cs:4985
bool CloseSoundOutputDevice()
Shutdown the output sound device.
Definition: TeamTalk.cs:5030
bool InitSoundOutputDevice(int nOutputDeviceID)
Initialize the sound output device (for audio playback).
Definition: TeamTalk.cs:4914
int GetSoundInputGainLevel()
Get voice gain level of outgoing audio.
Definition: TeamTalk.cs:5136
static bool RestartSoundSystem()
Reinitialize sound system (in order to detect new/removed devices).
Definition: TeamTalk.cs:4752
SoundSystem
The supported sound systems.
Definition: TeamTalk.cs:107
bool SetUserVolume(int nUserID, StreamType nStreamType, int nVolume)
Set the volume of a user.
Definition: TeamTalk.cs:7801
SoundDeviceFeature
Features available on a sound device. Checkout uSoundDeviceFeatures on BearWare.SoundDevice.
Definition: TeamTalk.cs:163
int GetSoundOutputVolume()
Get master volume.
Definition: TeamTalk.cs:5217
static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID, int nSampleRate, int nChannels, bool bDuplexMode, AudioPreprocessor lpAudioPreprocessor, BearWare.SoundDeviceEffects lpSoundDeviceEffects)
Perform a record and playback test of specified sound devices along with an audio configuration and a...
Definition: TeamTalk.cs:4799
bool SetSoundInputPreprocess(AudioPreprocessor lpAudioPreprocessor)
Enable sound preprocessor which should be used for processing audio recorded by the sound input devic...
Definition: TeamTalk.cs:5184
bool GetSoundInputPreprocess(ref AudioPreprocessor lpAudioPreprocessor)
Get the sound preprocessor settings which are currently in use for recorded sound input device (voice...
Definition: TeamTalk.cs:5196
bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes, bool bEnable)
Enable/disable access to raw audio from individual users, local microphone input or muxed stream of a...
Definition: TeamTalk.cs:5323
static bool GetDefaultSoundDevices(ref int lpnInputDeviceID, ref int lpnOutputDeviceID)
Get the default sound devices.
Definition: TeamTalk.cs:4705
bool SetUserJitterControl(int nUserID, StreamType nStreamType, JitterConfig lpJitterConfig)
Set the configuration for de-jitter measures for a user.
Definition: TeamTalk.cs:7863
static bool CloseSoundLoopbackTest(IntPtr lpTTSoundLoop)
Stop recorder and playback test.
Definition: TeamTalk.cs:4814
bool SetUserMute(int nUserID, StreamType nStreamType, bool bMute)
Mute a user.
Definition: TeamTalk.cs:7816
bool InitSoundInputDevice(int nInputDeviceID)
Initialize the sound input device (for recording audio).
Definition: TeamTalk.cs:4846
bool SetSoundInputGainLevel(int nLevel)
Set voice gaining of recorded audio.
Definition: TeamTalk.cs:5126
bool CloseSoundInputDevice()
Shutdown the input sound device.
Definition: TeamTalk.cs:5008
bool InitSoundInputSharedDevice(int nSampleRate, int nChannels, int nFrameSize)
Setup sample rate, channels and frame size of shared sound input device.
Definition: TeamTalk.cs:4881
bool SetSoundDeviceEffects(SoundDeviceEffects lpSoundDeviceEffect)
Set up audio effects on a sound device.
Definition: TeamTalk.cs:5079
@ SOUNDSYSTEM_WINMM
Windows legacy audio system. Should be used on Windows Mobile.
@ SOUNDSYSTEM_WASAPI
Windows Audio Session API (WASAPI). Should be used on Windows Vista/7/8/10.
@ SOUNDSYSTEM_DSOUND
DirectSound audio system. Should be used on Windows.
@ SOUNDSYSTEM_AUDIOUNIT
iOS sound API.
@ SOUNDSYSTEM_COREAUDIO
Core Audio. Should be used on MacOS.
@ SOUNDSYSTEM_AUDIOUNIT_IOS
Same as SoundSystem.SOUNDSYSTEM_AUDIOUNIT.
@ SOUNDSYSTEM_NONE
Sound system denoting invalid or not found.
@ SOUNDSYSTEM_ALSA
Advanced Linux Sound Architecture (ALSA). Should be used on Linux.
@ SOUNDSYSTEM_OPENSLES_ANDROID
Android sound API.
@ SOUNDDEVICEFEATURE_AEC
The BearWare.SoundDevice can enable Acoustic Echo Canceler (AEC). Enable AEC use property bEnableAEC ...
@ SOUNDDEVICEFEATURE_DEFAULTCOMDEVICE
The BearWare.SoundDevice is the default communication device. This feature is only supported on Sound...
@ SOUNDDEVICEFEATURE_AGC
The BearWare.SoundDevice can enable Automatic Gain Control (AGC). Enable AGC use property bEnableAGC ...
@ SOUNDDEVICEFEATURE_DUPLEXMODE
The BearWare.SoundDevice can run in duplex mode.
@ SOUNDDEVICEFEATURE_DENOISE
The BearWare.SoundDevice can enable denoising. Enable denoising use property bEnableDenoising on Bear...
@ SOUNDDEVICEFEATURE_3DPOSITION
The BearWare.SoundDevice can position user in 3D.
bool StartRecordingMuxedAudioFile(AudioCodec lpAudioCodec, string szAudioFileName, AudioFileFormat uAFF)
Store all audio conversations with specific BearWare.AudioCodec settings to a single file.
Definition: TeamTalk.cs:5552
int GetVoiceActivationLevel()
Get voice activation level.
Definition: TeamTalk.cs:5475
bool StopRecordingMuxedAudioFile(int nChannelID)
Stop recording conversations from a channel to a single file.
Definition: TeamTalk.cs:5653
bool StopVideoCaptureTransmission()
Stop transmitting from video capture device.
Definition: TeamTalk.cs:5689
StreamType
The types of streams which are available for transmission.
Definition: TeamTalk.cs:45
bool InsertAudioBlock(AudioBlock lpAudioBlock)
Transmit application provided raw audio in BearWare.AudioBlock-structs as StreamType....
Definition: TeamTalk.cs:5395
int GetVoiceActivationStopDelay()
Get the delay of when voice active state should be disabled.
Definition: TeamTalk.cs:5505
bool StopRecordingMuxedAudioFile()
Stop an active muxed audio recording.
Definition: TeamTalk.cs:5642
bool StartVideoCaptureTransmission(VideoCodec lpVideoCodec)
Start transmitting from video capture device.
Definition: TeamTalk.cs:5680
bool EnableVoiceTransmission(bool bEnable)
Start/stop transmitting of voice data from sound input.
Definition: TeamTalk.cs:5417
bool EnableVoiceActivation(bool bEnable)
Enable voice activation.
Definition: TeamTalk.cs:5447
bool StartRecordingMuxedAudioFile(int nChannelID, string szAudioFileName, AudioFileFormat uAFF)
Store audio conversations from a specific channel into a single file.
Definition: TeamTalk.cs:5581
bool SetVoiceActivationStopDelay(int nDelayMSec)
Set the delay of when voice activation should be stopped.
Definition: TeamTalk.cs:5491
bool StartRecordingMuxedStreams(StreamType uStreamTypes, AudioCodec lpAudioCodec, string szAudioFileName, AudioFileFormat uAFF)
Mix multiple BearWare.StreamType into a single audio file.
Definition: TeamTalk.cs:5623
bool SetVoiceActivationLevel(int nLevel)
Set voice activation level.
Definition: TeamTalk.cs:5465
@ STREAMTYPE_LOCALMEDIAPLAYBACK_AUDIO
Stream type for audio of local playback.
@ STREAMTYPE_NONE
No stream.
@ STREAMTYPE_DESKTOP
Desktop window stream type which is a window (or bitmap) being transmitted.
@ STREAMTYPE_CLASSROOM_ALL
Shortcut to allow voice, media files, desktop, webcamera and channel messages.
@ STREAMTYPE_DESKTOPINPUT
Desktop input stream type which is keyboard or mouse input being transmitted.
@ STREAMTYPE_VOICE
Voice stream type which is audio recorded from a sound input device.
@ STREAMTYPE_VIDEOCAPTURE
Video capture stream type which is video recorded from a webcam.
@ STREAMTYPE_CHANNELMSG
Channel text messages as stream type.
@ STREAMTYPE_MEDIAFILE
Shortcut to allow both audio and video media files.
@ STREAMTYPE_MEDIAFILE_AUDIO
Audio stream type from a media file which is being streamed.
@ STREAMTYPE_MEDIAFILE_VIDEO
Video stream type from a media file which is being streamed.
const int TT_CHANNELS_OPERATOR_MAX
Definition: TeamTalk.cs:4275
bool GetUserStatistics(int nUserID, ref UserStatistics lpUserStatistics)
Get statistics for data and packet reception from a user.
Definition: TeamTalk.cs:7769
BearWare.UserRight GetMyUserRights()
Convenience method for TeamTalkBase.GetMyUserAccount()
Definition: TeamTalk.cs:7730
UserType
The types of users supported.
Definition: TeamTalk.cs:2067
int GetMyUserID()
Get the local client instance's user ID.
Definition: TeamTalk.cs:7679
bool GetMyUserAccount(ref UserAccount lpUserAccount)
Get the local client instance's BearWare.UserAccount.
Definition: TeamTalk.cs:7694
int UserID
Same as GetMyUserID().
Definition: TeamTalk.cs:7702
int UserData
Same as GetMyUserData().
Definition: TeamTalk.cs:7752
UserType GetMyUserType()
Get the client instance's user type.
Definition: TeamTalk.cs:7714
bool GetUser(int nUserID, ref User lpUser)
Get the user with the specified ID.
Definition: TeamTalk.cs:7760
bool GetUserByUsername(string szUsername, ref User lpUser)
Get the user with the specified username.
Definition: TeamTalk.cs:7781
Subscription
A user by default accepts audio, video and text messages from all users. Using subscribtions can,...
Definition: TeamTalk.cs:2182
UserState
The possible states for a user. Used for BearWare.User's uUserState variable.
Definition: TeamTalk.cs:2248
BearWare.UserRight UserRights
Same as GetMyUserRights().
Definition: TeamTalk.cs:7727
int GetMyUserData()
If an account was used in TeamTalkBase.DoLogin() then this value will return the nUserData from the B...
Definition: TeamTalk.cs:7744
TextMsgType
Text message types.
Definition: TeamTalk.cs:2475
@ USERTYPE_NONE
Used internally to denote an unauthenticated user.
@ USERTYPE_DEFAULT
A default user who can join channels.
@ USERTYPE_ADMIN
A user with administrator privileges.
@ SUBSCRIBE_INTERCEPT_CUSTOM_MSG
Intercept all custom text messages sent by user. Only user-type UserType.USERTYPE_ADMIN can do this.
@ SUBSCRIBE_VOICE
Subscribing to StreamType.STREAMTYPE_VOICE.
@ SUBSCRIBE_DESKTOPINPUT
Subscribing to StreamType.STREAMTYPE_DESKTOPINPUT.
@ SUBSCRIBE_VIDEOCAPTURE
Subscribing to StreamType.STREAMTYPE_VIDEOCAPTURE.
@ SUBSCRIBE_MEDIAFILE
Subscribing to StreamType.STREAMTYPE_MEDIAFILE_VIDEO and StreamType.STREAMTYPE_MEDIAFILE_AUDIO.
@ SUBSCRIBE_INTERCEPT_MEDIAFILE
Intercept all media file data sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this....
@ SUBSCRIBE_BROADCAST_MSG
Subscribing to broadcast text messsages.
@ SUBSCRIBE_INTERCEPT_CHANNEL_MSG
Intercept all channel messages sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this.
@ SUBSCRIBE_DESKTOP
Subscribing to StreamType.STREAMTYPE_DESKTOP.
@ SUBSCRIBE_INTERCEPT_VIDEOCAPTURE
Intercept all video sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this....
@ SUBSCRIBE_INTERCEPT_USER_MSG
Intercept all user text messages sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this.
@ SUBSCRIBE_CUSTOM_MSG
Subscribing to custom user messages.
@ SUBSCRIBE_INTERCEPT_DESKTOP
Intercept all desktop data sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this....
@ SUBSCRIBE_CHANNEL_MSG
Subscribing to channel texxt messages.
@ SUBSCRIBE_USER_MSG
Subscribing to user text messages.
@ SUBSCRIBE_NONE
No subscriptions.
@ SUBSCRIBE_INTERCEPT_VOICE
Intercept all voice sent by a user. Only user-type UserType.USERTYPE_ADMIN can do this....
@ USERSTATE_MUTE_MEDIAFILE
If set the user's media file playback is muted.
@ USERSTATE_MEDIAFILE_AUDIO
If set the user currently streams an audio file. If user is streaming a video file with audio then th...
@ USERSTATE_VIDEOCAPTURE
If set the user currently has an active video stream. If this flag changes the event ClientEvent....
@ USERSTATE_MUTE_VOICE
If set the user's voice is muted.
@ USERSTATE_VOICE
If set the user is currently talking. If this flag changes the event ClientEvent.CLIENTEVENT_USER_STA...
@ USERSTATE_DESKTOP
If set the user currently has an active desktop session. If this flag changes the event ClientEvent....
@ USERSTATE_MEDIAFILE
If set user is streaming a media file. If this flag changes the event ClientEvent....
@ USERSTATE_MEDIAFILE_VIDEO
If set the user currently streams a video file. If this flag changes the event ClientEvent....
@ USERSTATE_NONE
The user is in initial state.
@ MSGTYPE_CUSTOM
A custom user to user text message. Works the same way as TextMsgType TextMsgType....
@ MSGTYPE_USER
A User to user text message. A message of this type can be sent across channels.
@ MSGTYPE_BROADCAST
A broadcast message. Requires UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST.
@ MSGTYPE_CHANNEL
A User to channel text message. Users of type UserType.USERTYPE_DEFAULT can only send this text messa...
bool PaintVideoFrame(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, ref VideoFrame lpVideoFrame)
Paint user's video frame using a Windows' DC (device context).
Definition: TeamTalk.cs:5760
bool InitVideoCaptureDevice(string szDeviceID, VideoFormat lpVideoFormat)
Initialize a video capture device.
Definition: TeamTalk.cs:5733
bool ReleaseUserVideoCaptureFrame(VideoFrame lpVideoFrame)
Delete a user's video frame, acquired through TeamTalkBase.AcquireUserVideoCaptureFrame(),...
Definition: TeamTalk.cs:5862
bool PaintVideoFrameEx(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight, ref VideoFrame lpVideoFrame)
Paint user's video frame using a Windows' DC (device context).
Definition: TeamTalk.cs:5803
VideoFrame AcquireUserVideoCaptureFrame(int nUserID, out Bitmap bmp)
Extract a user's video frame for display.
Definition: TeamTalk.cs:5838
static bool GetVideoCaptureDevices(out VideoCaptureDevice[] lpVideoDevices)
Get the list of devices available for video capture.
Definition: TeamTalk.cs:5705
bool CloseVideoCaptureDevice()
Close a video capture device.
Definition: TeamTalk.cs:5742
FourCC
The picture format used by a capture device.
Definition: TeamTalk.cs:597
const int TT_VIDEOFORMATS_MAX
Definition: TeamTalk.cs:4200
@ FOURCC_YUY2
Image format where a 640x480 pixel images takes up 614.400 bytes.
@ FOURCC_NONE
Internal use to denote no supported formats.
@ FOURCC_I420
Prefered image format with the lowest bandwidth usage. A 640x480 pixel image takes up 460....
@ FOURCC_RGB32
The image format with the highest bandwidth usage. A 640x480 pixel images takes up 1....
Properties to prevent server abuse.
Definition: TeamTalk.cs:2087
int nCommandsLimit
Limit number of commands a user can send to the server.
Definition: TeamTalk.cs:2097
int nCommandsIntervalMSec
Commands within given interval.
Definition: TeamTalk.cs:2099
An audio block containing the raw audio from a user who was talking.
Definition: TeamTalk.cs:472
int nSamples
The number of samples in the raw audio array.
Definition: TeamTalk.cs:486
StreamType uStreamTypes
The stream types used to generate the AudioBlock's raw audio.
Definition: TeamTalk.cs:507
int nSampleRate
The sample rate of the raw audio.
Definition: TeamTalk.cs:478
uint uSampleIndex
The index of the first sample in lpRawAudio. Its value will be a multiple of nSamples....
Definition: TeamTalk.cs:494
int nStreamID
The ID of the stream. The stream id changes every time the user enables a new transmission using Team...
Definition: TeamTalk.cs:476
int nChannels
The number of channels used (1 for mono, 2 for stereo).
Definition: TeamTalk.cs:480
System.IntPtr lpRawAudio
The raw audio in 16-bit integer format array. The size of the array in bytes is sizeof(short) * nSamp...
Definition: TeamTalk.cs:484
Struct used for specifying which audio codec a channel uses.
Definition: TeamTalk.cs:1564
SpeexVBRCodec speex_vbr
Speex codec settings if nCodec is Codec.SPEEX_VBR_CODEC.
Definition: TeamTalk.cs:1576
SpeexCodec speex
Speex codec settings if nCodec is Codec.SPEEX_CODEC.
Definition: TeamTalk.cs:1572
Codec nCodec
Specifies whether the member speex, speex_vbr or opus holds the codec settings.
Definition: TeamTalk.cs:1568
OpusCodec opus
Opus codec settings if nCodec is OPUS_CODEC.
Definition: TeamTalk.cs:1580
Audio configuration for clients in a channel.
Definition: TeamTalk.cs:1598
AudioConfig(bool set_defaults)
Definition: TeamTalk.cs:1606
int nGainLevel
Reference gain level to be used by all users.
Definition: TeamTalk.cs:1604
bool bEnableAGC
Users should enable automatic gain control.
Definition: TeamTalk.cs:1601
Struct describing the audio format used by a media file.
Definition: TeamTalk.cs:577
AudioFileFormat nAudioFmt
The audio file format, e.g. wave or MP3.
Definition: TeamTalk.cs:579
int nSampleRate
Sample rate of media file.
Definition: TeamTalk.cs:581
int nChannels
Channels used by media file, mono = 1, stereo = 2.
Definition: TeamTalk.cs:583
The progress of the audio currently being processed as audio input.
Definition: TeamTalk.cs:1693
uint uElapsedMSec
The duration of the audio that has been transmitted.
Definition: TeamTalk.cs:1701
int nStreamID
The stream ID provided in the BearWare.AudioBlock.
Definition: TeamTalk.cs:1695
uint uQueueMSec
The duration of the audio currently queued for transmission.
Definition: TeamTalk.cs:1698
Configure the audio preprocessor specified by nPreprocessor.
Definition: TeamTalk.cs:1468
WebRTCAudioPreprocessor webrtc
Used when nPreprocessor is AudioPreprocessorType.WEBRTC_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1480
SpeexDSP speexdsp
Used when nPreprocessor is AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1474
AudioPreprocessorType nPreprocessor
The audio preprocessor to use in the union of audio preprocessors.
Definition: TeamTalk.cs:1471
TTAudioPreprocessor ttpreprocessor
Used when nPreprocessor is AudioPreprocessorType.TEAMTALK_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1477
A struct containing the properties of a banned user.
Definition: TeamTalk.cs:2042
string szIPAddress
IP-address of banned user.
Definition: TeamTalk.cs:2045
string szNickname
Nickname of banned user. Read-only property.
Definition: TeamTalk.cs:2054
string szChannelPath
Channel where user was located when banned.
Definition: TeamTalk.cs:2048
string szUsername
Username of banned user.
Definition: TeamTalk.cs:2057
BanType uBanTypes
The type of ban that applies to this banned user.
Definition: TeamTalk.cs:2059
string szBanTime
Date and time when user was banned. Read-only property.
Definition: TeamTalk.cs:2051
A struct containing the properties of a channel.
Definition: TeamTalk.cs:2579
int nTransmitUsersQueueDelayMSec
Delay for switching to next active voice user in transmitUsersQueue.
Definition: TeamTalk.cs:2690
int[] transmitUsersQueue
The users currently queued for voice or media file transmission.
Definition: TeamTalk.cs:2681
void AddTransmitUser(int nUserID, StreamType uStreamType)
Helper function for adding a user and BearWare.StreamType to transmitUsers.
Definition: TeamTalk.cs:2704
int GetTransmitUserCount()
Get the number of users who can currently transmit to the ChannelType.CHANNEL_CLASSROOM.
Definition: TeamTalk.cs:2731
AudioConfig audiocfg
The audio configuration which users who join the channel should use.
Definition: TeamTalk.cs:2618
void RemoveTransmitUser(int nUserID, StreamType uStreamType)
Helper function for removing a StreamType for a user in transmitUsers.
Definition: TeamTalk.cs:2742
int nTimeOutTimerMediaFileMSec
Time out timer for media file stream. The maximum time in miliseconds a user can transmit a media fil...
Definition: TeamTalk.cs:2700
bool bPassword
Whether password is required to join channel. Read-only property.
Definition: TeamTalk.cs:2599
string szPassword
Password to join the channel. When extracted through TeamTalkBase.GetChannel() the password will only...
Definition: TeamTalk.cs:2596
long nDiskQuota
Number of bytes available for file storage.
Definition: TeamTalk.cs:2607
int[] transmitUsers
List of users who can transmit in a channel.
Definition: TeamTalk.cs:2675
StreamType GetTransmitStreamTypes(int nUserID)
Helper function for getting the StreamType a user can transmit by querying transmitUsers.
Definition: TeamTalk.cs:2720
string szTopic
Topic of the channel.
Definition: TeamTalk.cs:2591
AudioCodec audiocodec
The audio codec used by users in the channel.
Definition: TeamTalk.cs:2615
int nUserData
User specific data which will be stored on persistent storage on the server if the channel type is Ch...
Definition: TeamTalk.cs:2605
int nTimeOutTimerVoiceMSec
Time out timer for voice stream. The maximum time in miliseconds a user can transmit voice without ch...
Definition: TeamTalk.cs:2695
string szOpPassword
Password to become channel operator.
Definition: TeamTalk.cs:2611
int nParentID
Parent channel ID. 0 means no parent channel, i.e. it's the root channel.
Definition: TeamTalk.cs:2582
int nChannelID
The channel's ID. A value from 1 - BearWare.TeamTalkBase.TT_CHANNELID_MAX.
Definition: TeamTalk.cs:2585
ChannelType uChannelType
A bitmask of the type of channel based on BearWare.ChannelType.
Definition: TeamTalk.cs:2601
int nMaxUsers
Max number of users in channel.
Definition: TeamTalk.cs:2613
string szName
Name of the channel.
Definition: TeamTalk.cs:2588
string szErrorMsg
Text message describing the error.
Definition: TeamTalk.cs:3341
int nErrorNo
Error number based on ClientError.
Definition: TeamTalk.cs:3338
Control timers for sending keep alive information to the server.
Definition: TeamTalk.cs:2900
int nUdpConnectTimeoutMSec
The duration before the client instance should give up trying to connect to the server on UDP....
Definition: TeamTalk.cs:2942
int nUdpKeepAliveRTXMSec
Client instance's interval for retransmitting UDP keep alive packets. If server hasn't responded to U...
Definition: TeamTalk.cs:2927
int nUdpConnectRTXMSec
Client instance's interval for retransmitting UDP connect packets. UDP connect packets are only sent ...
Definition: TeamTalk.cs:2934
int nTcpKeepAliveIntervalMSec
Client instance's interval between TeamTalkBase.DoPing() command. Read-only value....
Definition: TeamTalk.cs:2915
int nUdpKeepAliveIntervalMSec
Client instance's interval between sending UDP keep alive packets. The UDP keep alive packets are use...
Definition: TeamTalk.cs:2921
int nConnectionLostMSec
The duration before the TeamTalk instance should consider the client/server connection lost.
Definition: TeamTalk.cs:2911
Statistics of bandwidth usage and ping times in the local client instance.
Definition: TeamTalk.cs:2951
long nVoiceBytesRecv
Voice data received (on UDP).
Definition: TeamTalk.cs:2959
int nSoundInputDeviceDelayMSec
Delay of sound input device until the first audio frame is delivered (in msec).
Definition: TeamTalk.cs:3001
long nVideoCaptureBytesRecv
Video data received (on UDP).
Definition: TeamTalk.cs:2963
int nTcpPingTimeMs
Response time to server on TCP (based on ping/pong sent at a specified interval. Set to -1 if not cur...
Definition: TeamTalk.cs:2983
int nUdpServerSilenceSec
The number of seconds nothing has been received by the client on UDP.
Definition: TeamTalk.cs:2989
long nMediaFileVideoBytesSent
Video from media file data sent (on UDP).
Definition: TeamTalk.cs:2969
long nMediaFileVideoBytesRecv
Video from media file data received (on UDP).
Definition: TeamTalk.cs:2971
long nMediaFileAudioBytesSent
Audio from media file data sent (on UDP).
Definition: TeamTalk.cs:2965
long nVoiceBytesSent
Voice data sent (on UDP).
Definition: TeamTalk.cs:2957
long nUdpBytesSent
Bytes sent on UDP.
Definition: TeamTalk.cs:2953
long nMediaFileAudioBytesRecv
Audio from media file data received (on UDP).
Definition: TeamTalk.cs:2967
long nVideoCaptureBytesSent
Video data sent (on UDP).
Definition: TeamTalk.cs:2961
int nTcpServerSilenceSec
The number of seconds nothing has been received by the client on TCP.
Definition: TeamTalk.cs:2986
long nUdpBytesRecv
Bytes received on UDP.
Definition: TeamTalk.cs:2955
long nDesktopBytesSent
Desktop data sent (on UDP).
Definition: TeamTalk.cs:2973
long nDesktopBytesRecv
Desktop data received (on UDP).
Definition: TeamTalk.cs:2975
int nUdpPingTimeMs
Response time to server on UDP (based on ping/pong sent at a specified interval. Set to -1 if not cur...
Definition: TeamTalk.cs:2979
Constants for BearWare.DesktopInput.
Definition: TeamTalk.cs:847
A struct containing a mouse or keyboard event.
Definition: TeamTalk.cs:809
ushort uMousePosX
The X coordinate of the mouse. If used with WindowsHelper.Execute() and the mouse position should be ...
Definition: TeamTalk.cs:813
uint uKeyCode
The key-code (or mouse button) pressed. If used with TeamTalkBase.DesktopInput_Execute() and no key (...
Definition: TeamTalk.cs:823
DesktopInput(bool set_defaults)
When true initializes the desktop input to ignore mouse and key values.
Definition: TeamTalk.cs:828
ushort uMousePosY
The Y coordinate of the mouse. If used with TeamTalkBase.DesktopInput_Execute() and the mouse positio...
Definition: TeamTalk.cs:817
DesktopKeyState uKeyState
The state of the key (or mouse button) pressed, i.e. if it's up or down.
Definition: TeamTalk.cs:826
A struct containing the properties of a shared desktop window.
Definition: TeamTalk.cs:761
int nSessionID
The ID of the session which the bitmap belongs to. If the session ID changes it means the user has st...
Definition: TeamTalk.cs:777
int nWidth
The width in pixels of the bitmap.
Definition: TeamTalk.cs:763
DesktopProtocol nProtocol
The desktop protocol used for transmitting the desktop window.
Definition: TeamTalk.cs:779
int nBytesPerLine
The number of bytes for each scan-line in the bitmap. Zero means 4-byte aligned.
Definition: TeamTalk.cs:770
IntPtr frameBuffer
A buffer pointing to the bitmap data (often refered to as Scan0).
Definition: TeamTalk.cs:781
int nFrameBufferSize
The size in bytes of the buffer allocate in frameBuffer. Typically nBytesPerLine * nHeight.
Definition: TeamTalk.cs:784
BitmapFormat bmpFormat
The format of the bitmap.
Definition: TeamTalk.cs:767
int nHeight
The height in pixels of the bitmap.
Definition: TeamTalk.cs:765
Configure peer verification for encrypted connection.
Definition: TeamTalk.cs:2842
string szCAFile
Path to Certificate Authority (CA) Certificate in PEM format.
Definition: TeamTalk.cs:2858
bool bVerifyClientOnce
Whether to only verify client's certificate once during initial connection.
Definition: TeamTalk.cs:2880
int nVerifyDepth
Set limit to depth in the certificate chain during the verification procedure.
Definition: TeamTalk.cs:2888
string szCertificateFile
Path to SSL certificate in PEM format.
Definition: TeamTalk.cs:2849
string szPrivateKeyFile
Path to certificate's private key.
Definition: TeamTalk.cs:2852
bool bVerifyPeer
Verify that peer (client or server) uses a certificate that has been generated by the Certificate Aut...
Definition: TeamTalk.cs:2869
string szCADir
Path to directory containing Certificate Authority (CA) Certificates in PEM format.
Definition: TeamTalk.cs:2862
A struct containing the properties of a file transfer.
Definition: TeamTalk.cs:2786
bool bInbound
TRUE if download and FALSE if upload.
Definition: TeamTalk.cs:2804
FileTransferStatus nStatus
Status of file transfer.
Definition: TeamTalk.cs:2788
string szRemoteFileName
The filename in the channel.
Definition: TeamTalk.cs:2798
string szLocalFilePath
The file path on local disk.
Definition: TeamTalk.cs:2795
long nTransferred
The number of bytes transferred so far.
Definition: TeamTalk.cs:2802
long nFileSize
The size of the file being transferred.
Definition: TeamTalk.cs:2800
int nTransferID
The ID identifying the file transfer.
Definition: TeamTalk.cs:2790
int nChannelID
The channel where the file is/will be located.
Definition: TeamTalk.cs:2792
Configuration parameters for the Jitter Buffer.
Definition: TeamTalk.cs:3011
int nMaxAdaptiveDelayMSec
A hard maximum delay on the adaptive delay. Only valid when higher than zero. Default = 0.
Definition: TeamTalk.cs:3018
int nActiveAdaptiveDelayMSec
The current adaptive delay. When used with TeamTalkBase.SetUserJitterControl(), this value is used as...
Definition: TeamTalk.cs:3025
bool bUseAdativeDejitter
Turns adaptive jitter buffering ON/OFF. Default is OFF.
Definition: TeamTalk.cs:3015
int nFixedDelayMSec
The fixed delay in milliseconds. Default = 0.
Definition: TeamTalk.cs:3013
Struct describing the audio and video format used by a media file.
Definition: TeamTalk.cs:1651
uint uElapsedMSec
The elapsed time of the media file in miliseconds.
Definition: TeamTalk.cs:1665
AudioFormat audioFmt
The audio properties of the media file.
Definition: TeamTalk.cs:1659
VideoFormat videoFmt
The video properties of the media file.
Definition: TeamTalk.cs:1661
string szFileName
Name of file.
Definition: TeamTalk.cs:1657
uint uDurationMSec
The duration of the media file in miliseconds.
Definition: TeamTalk.cs:1663
MediaFileStatus nStatus
Status of media file if it's being saved to disk.
Definition: TeamTalk.cs:1654
Properties for initializing or updating a file for media streaming.
Definition: TeamTalk.cs:1677
uint uOffsetMSec
Offset in milliseconds in the media file where to start playback. Pass BearWare.TeamTalkBase....
Definition: TeamTalk.cs:1682
AudioPreprocessor audioPreprocessor
Option to activate audio preprocessor on local media file playback.
Definition: TeamTalk.cs:1686
bool bPaused
Start or pause media file playback.
Definition: TeamTalk.cs:1684
OPUS audio codec settings. For detailed information about the OPUS codec check out http://www....
Definition: TeamTalk.cs:1038
int nFrameSizeMSec
OPUS supports 2.5, 5, 10, 20, 40, 60, 80, 100 and 120 msec. If nFrameSizeMSec is 0 then nFrameSizeMSe...
Definition: TeamTalk.cs:1076
bool bFEC
Forward error correction. Corrects errors if there's packetloss.
Definition: TeamTalk.cs:1053
bool bVBR
Enable variable bitrate.
Definition: TeamTalk.cs:1062
int nComplexity
Complexity of encoding (affects CPU usage). Value from 0-10.
Definition: TeamTalk.cs:1050
bool bDTX
Discontinuous transmission. Enables "null" packets during silence.
Definition: TeamTalk.cs:1056
int nSampleRate
The sample rate to use. Sample rate must be 8000, 12000, 16000, 24000 or 48000 Hz.
Definition: TeamTalk.cs:1041
int nApplication
Application of encoded audio, VoIP or music.
Definition: TeamTalk.cs:1047
bool bVBRConstraint
Enable constrained VBR. bVBR must be enabled to enable this.
Definition: TeamTalk.cs:1065
int nTxIntervalMSec
Duration of audio before each transmission. Minimum is 2 msec. Recommended is 40 msec....
Definition: TeamTalk.cs:1072
int nBitRate
Bitrate for encoded audio. Should be between BearWare.OpusConstants.OPUS_MIN_BITRATE and BearWare....
Definition: TeamTalk.cs:1060
int nChannels
Mono = 1 or stereo = 2.
Definition: TeamTalk.cs:1043
OPUS constants for BearWare.OpusCodec.
Definition: TeamTalk.cs:1081
const bool DEFAULT_OPUS_FEC
Definition: TeamTalk.cs:1110
const int DEFAULT_OPUS_COMPLEXITY
Definition: TeamTalk.cs:1109
const bool DEFAULT_OPUS_VBR
Definition: TeamTalk.cs:1112
const bool DEFAULT_OPUS_VBRCONSTRAINT
Definition: TeamTalk.cs:1113
const int DEFAULT_OPUS_APPLICATION
Definition: TeamTalk.cs:1106
const int OPUS_MIN_FRAMESIZE
The minimum frame size for OPUS codec. Checkout nFrameSizeMSec of BearWare.OpusCodec.
Definition: TeamTalk.cs:1097
const int DEFAULT_OPUS_CHANNELS
Definition: TeamTalk.cs:1108
const bool DEFAULT_OPUS_DTX
Definition: TeamTalk.cs:1111
const int OPUS_MAX_BITRATE
The maximum bitrate for OPUS codec. Checkout nBitRate of BearWare.OpusCodec.
Definition: TeamTalk.cs:1093
const int DEFAULT_OPUS_DELAY
Definition: TeamTalk.cs:1115
const int OPUS_REALMAX_FRAMESIZE
The real maximum frame size for OPUS codec. Checkout nFrameSizeMSec of BearWare.OpusCodec....
Definition: TeamTalk.cs:1104
const int OPUS_MAX_FRAMESIZE
The maximum frame size for OPUS codec. Checkout nFrameSizeMSec of BearWare.OpusCodec.
Definition: TeamTalk.cs:1100
const int DEFAULT_OPUS_SAMPLERATE
Definition: TeamTalk.cs:1107
const int OPUS_APPLICATION_AUDIO
Audio encoding is for music. This value should be set as nApplicaton in BearWare.OpusCodec.
Definition: TeamTalk.cs:1087
const int OPUS_MIN_BITRATE
The minimum bitrate for OPUS codec. Checkout nBitRate of BearWare.OpusCodec.
Definition: TeamTalk.cs:1090
const int DEFAULT_OPUS_BITRATE
Definition: TeamTalk.cs:1114
const int OPUS_APPLICATION_VOIP
Audio encoding is for VoIP. This value should be set as nApplicaton in BearWare.OpusCodec.
Definition: TeamTalk.cs:1084
A struct containing the properties of a file in a BearWare.Channel.
Definition: TeamTalk.cs:2812
int nChannelID
The ID of the channel where the file is located.
Definition: TeamTalk.cs:2814
long nFileSize
The size of the file.
Definition: TeamTalk.cs:2821
string szUploadTime
Time when file was uploaded. Date/time is converted local time.
Definition: TeamTalk.cs:2828
string szFileName
The name of the file.
Definition: TeamTalk.cs:2819
int nFileID
The ID identifying the file.
Definition: TeamTalk.cs:2816
string szUsername
Username of the person who uploaded the files.
Definition: TeamTalk.cs:2824
A struct containing the properties of the server's settings.
Definition: TeamTalk.cs:1877
int nMaxMediaFileTxPerSecond
The maximum number of bytes per second which the server will allow for media file packets....
Definition: TeamTalk.cs:1916
int nUserTimeout
The number of seconds before a user who hasn't responded to keepalives will be kicked off the server.
Definition: TeamTalk.cs:1933
bool bAutoSave
Whether the server automatically saves changes.
Definition: TeamTalk.cs:1926
string szServerProtocolVersion
The version of the server's protocol.
Definition: TeamTalk.cs:1939
int nMaxLoginsPerIPAddress
The maximum number of users allowed to log in with the same IP-address. 0 means disabled.
Definition: TeamTalk.cs:1903
ServerLogEvent uServerLogEvents
The events that are logged on the server.
Definition: TeamTalk.cs:1959
string szAccessToken
A randomly generated 256 bit access token created by the server to identify the login session....
Definition: TeamTalk.cs:1953
int nMaxDesktopTxPerSecond
The maximum number of bytes per second which the server will allow for desktop packets....
Definition: TeamTalk.cs:1920
int nUdpPort
The server's UDP port.
Definition: TeamTalk.cs:1930
int nLoginDelayMSec
Number of msec before an IP-address can make another login attempt. If less than this amount then Tea...
Definition: TeamTalk.cs:1948
int nMaxTotalTxPerSecond
The amount of bytes per second which the server will allow for packet forwarding. If this value is ex...
Definition: TeamTalk.cs:1924
string szServerName
The server's name.
Definition: TeamTalk.cs:1880
int nMaxLoginAttempts
The maximum number of logins with wrong password before banning user's IP-address.
Definition: TeamTalk.cs:1900
string szMOTD
The message of the day. Read-only property. Use szMOTDRaw to update this property.
Definition: TeamTalk.cs:1884
string szMOTDRaw
The message of the day including variables. The result of the szMOTDRaw string will be displayed in s...
Definition: TeamTalk.cs:1894
int nMaxUsers
The maximum number of users allowed on the server. A user with admin account can ignore this.
Definition: TeamTalk.cs:1897
int nTcpPort
The server's TCP port.
Definition: TeamTalk.cs:1928
string szServerVersion
The server version.
Definition: TeamTalk.cs:1936
int nMaxVoiceTxPerSecond
The maximum number of bytes per second which the server will allow for voice packets....
Definition: TeamTalk.cs:1907
int nMaxVideoCaptureTxPerSecond
The maximum number of bytes per second which the server will allow for video input packets....
Definition: TeamTalk.cs:1912
A struct containing the server's statistics, i.e. bandwidth usage and user activity.
Definition: TeamTalk.cs:1971
long nMediaFileBytesTX
The number of bytes in media file packets sent from the server to clients.
Definition: TeamTalk.cs:1992
long nVideoCaptureBytesTX
The number of bytes in video packets sent from the server to clients.
Definition: TeamTalk.cs:1986
long nFilesRx
The number of bytes for file transmission received by the server.
Definition: TeamTalk.cs:2011
long nDesktopBytesTX
The number of bytes in desktop packets sent from the server to clients.
Definition: TeamTalk.cs:1998
long nFilesTx
The number of bytes for file transmission transmitted from the server.
Definition: TeamTalk.cs:2008
long nUptimeMSec
The server's uptime in msec.
Definition: TeamTalk.cs:2013
long nVoiceBytesRX
The number of bytes in audio packets received by the server from clients.
Definition: TeamTalk.cs:1983
int nUsersServed
The number of users who have logged on to the server.
Definition: TeamTalk.cs:2003
long nTotalBytesRX
The number of bytes received by the server from clients.
Definition: TeamTalk.cs:1977
long nTotalBytesTX
The number of bytes sent from the server to clients.
Definition: TeamTalk.cs:1974
long nVideoCaptureBytesRX
The number of bytes in video packets received by the server from clients.
Definition: TeamTalk.cs:1989
long nDesktopBytesRX
The number of bytes in desktop packets received by the server from clients.
Definition: TeamTalk.cs:2001
long nVoiceBytesTX
The number of bytes in audio packets sent from the server to clients.
Definition: TeamTalk.cs:1980
long nMediaFileBytesRX
The number of bytes in media file packets received by the server from clients.
Definition: TeamTalk.cs:1995
int nUsersPeak
The highest numbers of users online.
Definition: TeamTalk.cs:2005
A struct which describes the properties of a window which can be shared.
Definition: TeamTalk.cs:9166
IntPtr hWnd
The Windows handle of the window.
Definition: TeamTalk.cs:9168
string szWindowTitle
The title of the window.
Definition: TeamTalk.cs:9179
int nWndX
X coordinate of the window relative to the Windows desktop.
Definition: TeamTalk.cs:9170
int nHeight
The height in pixels of the window.
Definition: TeamTalk.cs:9176
int nWndY
Y coordinate of the window relative to the Windows desktop.
Definition: TeamTalk.cs:9172
int nWidth
The width in pixels of the window.
Definition: TeamTalk.cs:9174
IDs for sound devices.
Definition: TeamTalk.cs:334
const int TT_SOUNDDEVICE_ID_OPENSLES_VOICECOM
Sound device ID for Android OpenSL ES voice communication mode. This device uses the OpenSL ES' Andro...
Definition: TeamTalk.cs:353
const int TT_SOUNDDEVICE_ID_OPENSLES_DEFAULT
Sound device ID for Android OpenSL ES default audio device. Note that this sound device may also exis...
Definition: TeamTalk.cs:348
const int TT_SOUNDDEVICE_ID_TEAMTALK_VIRTUAL
Sound device ID for virtual TeamTalk sound device.
Definition: TeamTalk.cs:362
const uint TT_SOUNDDEVICE_ID_MASK
Extract sound device ID of nDeviceID in BearWare.SoundDevice by and'ing this value.
Definition: TeamTalk.cs:384
const int TT_SOUNDDEVICE_ID_VOICEPREPROCESSINGIO
Sound device ID for iOS AudioUnit subtype Voice-Processing I/O Unit. This sound device ID include the...
Definition: TeamTalk.cs:343
const uint TT_SOUNDDEVICE_ID_SHARED_FLAG
Flag/bit in nDeviceID telling if the BearWare.SoundDevice is a shared version of an existing sound de...
Definition: TeamTalk.cs:378
const int TT_SOUNDDEVICE_ID_REMOTEIO
Sound device ID for iOS AudioUnit subtype Remote I/O Unit.
Definition: TeamTalk.cs:337
Set up audio effects supported by the sound device.
Definition: TeamTalk.cs:279
bool bEnableEchoCancellation
Enable echo cancellation.
Definition: TeamTalk.cs:328
bool bEnableAGC
Enable Automatic Gain Control.
Definition: TeamTalk.cs:295
bool bEnableDenoise
Enable noise suppression.
Definition: TeamTalk.cs:312
A struct containing the properties of a sound device for either playback or recording.
Definition: TeamTalk.cs:207
int nWaveDeviceID
A Windows specific ID to the sound device.
Definition: TeamTalk.cs:241
string szDeviceID
An identifier uniquely identifying the sound device even when new sound devices are being added and r...
Definition: TeamTalk.cs:224
bool bSupports3D
Whether the sound device supports 3D-sound effects.
Definition: TeamTalk.cs:244
SoundDeviceFeature uSoundDeviceFeatures
Additional features available for this sound device. The sound device features can be used to enable ...
Definition: TeamTalk.cs:266
int[] inputSampleRates
Supported sample rates by device for recording. A zero value terminates the list of supported sample ...
Definition: TeamTalk.cs:253
int nDefaultSampleRate
The default sample rate for the sound device.
Definition: TeamTalk.cs:260
int nMaxInputChannels
The maximum number of input channels.
Definition: TeamTalk.cs:246
SoundSystem nSoundSystem
The sound system used by the sound device.
Definition: TeamTalk.cs:215
int nDeviceID
The ID of the sound device. Used for passing to TeamTalkBase.InitSoundInputDevice() and TeamTalkBase....
Definition: TeamTalk.cs:213
string szDeviceName
The name of the sound device.
Definition: TeamTalk.cs:218
int[] outputSampleRates
Supported sample rates by device for playback. A zero value terminates the list of supported sample r...
Definition: TeamTalk.cs:258
int nMaxOutputChannels
The maximum number of output channels.
Definition: TeamTalk.cs:248
An enum encapsulation the minimum, maximum and default sound levels for input and output sound device...
Definition: TeamTalk.cs:391
const int SOUND_VU_MAX
The maximum value of recorded audio.
Definition: TeamTalk.cs:397
const int SOUND_VOLUME_MAX
The maximum volume.
Definition: TeamTalk.cs:411
const int SOUND_GAIN_MIN
The minimum gain level (since it's zero it means silence).
Definition: TeamTalk.cs:453
const int SOUND_VOLUME_MIN
The minimum volume.
Definition: TeamTalk.cs:425
const int SOUND_VU_MIN
The minimum value of recorded audio.
Definition: TeamTalk.cs:403
const int SOUND_GAIN_DEFAULT
The default gain level.
Definition: TeamTalk.cs:444
const int SOUND_GAIN_MAX
The maximum gain level.
Definition: TeamTalk.cs:434
const int SOUND_VOLUME_DEFAULT
The default volume. Use this whenever possible since it requires the least amount of CPU usage.
Definition: TeamTalk.cs:419
Speex audio codec settings for Constant Bitrate mode (CBR).
Definition: TeamTalk.cs:905
int nQuality
A value from 1-10. As of DLL version 4.2 also 0 is supported.
Definition: TeamTalk.cs:913
int nTxIntervalMSec
Milliseconds of audio data before each transmission.
Definition: TeamTalk.cs:924
int nBandmode
Set to 0 for 8 KHz (narrow band), set to 1 for 16 KHz (wide band), set to 2 for 32 KHz (ultra-wide ba...
Definition: TeamTalk.cs:909
bool bStereoPlayback
Playback should be done in stereo. Doing so will disable 3d-positioning.
Definition: TeamTalk.cs:931
Speex constants for BearWare.SpeexCodec and BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:982
const int SPEEX_BANDMODE_UWIDE
Use BearWare.SpeexCodec or BearWare.SpeexVBRCodec as 32 KHz.
Definition: TeamTalk.cs:988
const bool DEFAULT_SPEEX_DTX
Default Speex DTX for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1031
const int SPEEX_NB_MAX_BITRATE
The maximum bitrate for Speex codec in 8 KHz mode, i.e. quality set to 10.
Definition: TeamTalk.cs:998
const int SPEEX_QUALITY_MAX
The maximum quality for Speex codec.
Definition: TeamTalk.cs:992
const int SPEEX_QUALITY_MIN
The minimum quality for Speex codec.
Definition: TeamTalk.cs:990
const int SPEEX_WB_MAX_BITRATE
The maximum bitrate for Speex codec in 16 KHz mode, i.e. quality set to 10.
Definition: TeamTalk.cs:1004
const int SPEEX_WB_MIN_BITRATE
The minimum bitrate for Speex codec in 16 KHz mode, i.e. quality set to 0.
Definition: TeamTalk.cs:1001
const int DEFAULT_SPEEX_DELAY
Default Speex delay for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1019
const int SPEEX_BANDMODE_NARROW
Use BearWare.SpeexCodec or BearWare.SpeexVBRCodec as 8 KHz.
Definition: TeamTalk.cs:984
const int SPEEX_UWB_MIN_BITRATE
The minimum bitrate for Speex codec in 32 KHz mode, i.e. quality set to 0.
Definition: TeamTalk.cs:1007
const int DEFAULT_SPEEX_BITRATE
Default Speex bitrate for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1025
const int SPEEX_BANDMODE_WIDE
Use BearWare.SpeexCodec or BearWare.SpeexVBRCodec as 16 KHz.
Definition: TeamTalk.cs:986
const int SPEEX_UWB_MAX_BITRATE
The maximum bitrate for Speex codec in 32 KHz mode, i.e. quality set to 10.
Definition: TeamTalk.cs:1010
const int DEFAULT_SPEEX_MAXBITRATE
Default Speex max bitrate for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1028
const int DEFAULT_SPEEX_BANDMODE
Default Speex bandmode for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1013
const bool DEFAULT_SPEEX_SIMSTEREO
Default Speex stereo playback for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1022
const int DEFAULT_SPEEX_QUALITY
Default Speex quality for BearWare.SpeexCodec or BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:1016
const int SPEEX_NB_MIN_BITRATE
The minimum bitrate for Speex codec in 8 KHz mode, i.e. quality set to 0.
Definition: TeamTalk.cs:995
Default values for BearWare.SpeexDSP.
Definition: TeamTalk.cs:1485
const int DEFAULT_DENOISE_SUPPRESS
Definition: TeamTalk.cs:1492
const int DEFAULT_ECHO_SUPPRESS_ACTIVE
Definition: TeamTalk.cs:1495
const bool DEFAULT_AGC_ENABLE
Definition: TeamTalk.cs:1486
const int DEFAULT_ECHO_SUPPRESS
Definition: TeamTalk.cs:1494
const int DEFAULT_AGC_DEC_MAXDB
Definition: TeamTalk.cs:1489
const bool DEFAULT_ECHO_ENABLE
Definition: TeamTalk.cs:1493
const bool DEFAULT_DENOISE_ENABLE
Definition: TeamTalk.cs:1491
const int DEFAULT_AGC_INC_MAXDB
Definition: TeamTalk.cs:1488
const int DEFAULT_AGC_GAINMAXDB
Definition: TeamTalk.cs:1490
const int DEFAULT_AGC_GAINLEVEL
Definition: TeamTalk.cs:1487
Audio configuration specifying how recorded audio from sound input device should be preprocessed befo...
Definition: TeamTalk.cs:1137
SpeexDSP(bool set_defaults)
Definition: TeamTalk.cs:1207
int nMaxDecDBSec
Used so volume should not be attenuated too quickly (maximal gain decrease in dB/second)....
Definition: TeamTalk.cs:1161
bool bEnableDenoise
Whether clients who join the channel should automatically enable denoising.
Definition: TeamTalk.cs:1170
bool bEnableAGC
Whether clients who join a BearWare.Channel should enable AGC with the settings specified nGainLevel,...
Definition: TeamTalk.cs:1146
int nMaxIncDBSec
Used so volume should not be amplified too quickly (maximal gain increase in dB/second)....
Definition: TeamTalk.cs:1155
int nGainLevel
A value from 0 to 32768. Default is 8000. Value is ignored if bEnableAGC is FALSE.
Definition: TeamTalk.cs:1150
int nEchoSuppressActive
Set maximum attenuation of the residual echo in dB when near end is active (negative number)....
Definition: TeamTalk.cs:1205
int nEchoSuppress
Set maximum attenuation of the residual echo in dB (negative number). Default is -40....
Definition: TeamTalk.cs:1200
int nMaxGainDB
Ensure volume doesn't become too loud (maximal gain in dB). Default is 30. Value is ignored if bEnabl...
Definition: TeamTalk.cs:1166
bool bEnableEchoCancellation
Speex DSP is used for specifying how recorded audio from a sound input device should be preprocessed ...
Definition: TeamTalk.cs:1195
int nMaxNoiseSuppressDB
Maximum attenuation of the noise in dB. Negative value! Default value is -30. Value is ignored if bEn...
Definition: TeamTalk.cs:1175
Speex audio codec settings for Variable Bitrate mode (VBR).
Definition: TeamTalk.cs:941
int nTxIntervalMSec
Milliseconds of audio data before each transmission.
Definition: TeamTalk.cs:971
int nMaxBitRate
The maximum bitrate at which the audio codec is allowed to output audio. Set to zero if it should be ...
Definition: TeamTalk.cs:958
bool bDTX
Enable/disable discontinuous transmission. When enabled Speex will ignore silence,...
Definition: TeamTalk.cs:962
int nQuality
A value from 0-10. If nBitRate is non-zero it will override this value.
Definition: TeamTalk.cs:947
int nBandmode
Set to 0 for 8 KHz (narrow band), set to 1 for 16 KHz (wide band), set to 2 for 32 KHz (ultra-wide ba...
Definition: TeamTalk.cs:944
int nBitRate
The bitrate at which the audio codec should output encoded audio data. Dividing it by 8 gives roughly...
Definition: TeamTalk.cs:954
bool bStereoPlayback
Playback should be done in stereo. Doing so will disable 3d-positioning.
Definition: TeamTalk.cs:977
Use TeamTalk's internal audio preprocessor for gain audio. Same as used for TeamTalkBase....
Definition: TeamTalk.cs:1246
bool bMuteLeftSpeaker
Whether to mute left speaker in stereo playback.
Definition: TeamTalk.cs:1252
bool bMuteRightSpeaker
Whether to mute right speaker in stereo playback.
Definition: TeamTalk.cs:1254
int nGainLevel
Gain level between BearWare.SoundLevel.SOUND_GAIN_MIN and BearWare.SoundLevel.SOUND_GAIN_MAX....
Definition: TeamTalk.cs:1250
A struct containing the properties of an event.
Definition: TeamTalk.cs:3971
uint uReserved
Reserved. To preserve alignment.
Definition: TeamTalk.cs:3979
int nSource
The source of the event depends on wmMsg.
Definition: TeamTalk.cs:3975
ClientEvent nClientEvent
The event's message number.
Definition: TeamTalk.cs:3973
TTType ttType
Specifies which member to access in the union.
Definition: TeamTalk.cs:3977
object DataToObject()
Definition: TeamTalk.cs:3984
A struct containing the properties of a text message sent by a user.
Definition: TeamTalk.cs:2501
bool bMore
Whether this text message is to be merged with next text message.
Definition: TeamTalk.cs:2520
int nChannelID
Set to zero if nMsgType is TextMsgType TextMsgType.MSGTYPE_USER or TextMsgType TextMsgType....
Definition: TeamTalk.cs:2513
int nToUserID
Set to zero if channel message.
Definition: TeamTalk.cs:2510
string szMessage
The actual text message. The message can be multi-line (include EOL)
Definition: TeamTalk.cs:2517
int nFromUserID
Will be set automatically on outgoing message.
Definition: TeamTalk.cs:2505
string szFromUsername
The originators username.
Definition: TeamTalk.cs:2508
TextMsgType nMsgType
The type of text message.
Definition: TeamTalk.cs:2503
FileTransfer filetransfer
Definition: TeamTalk.cs:4036
ClientErrorMsg clienterrormsg
Definition: TeamTalk.cs:4030
DesktopInput desktopinput
Definition: TeamTalk.cs:4034
TextMessage textmessage
Definition: TeamTalk.cs:4044
ServerProperties serverproperties
Definition: TeamTalk.cs:4042
UserAccount useraccount
Definition: TeamTalk.cs:4048
MediaFileInfo mediafileinfo
Definition: TeamTalk.cs:4038
RemoteFile remotefile
Definition: TeamTalk.cs:4040
A struct containing the properties of a user account.
Definition: TeamTalk.cs:2112
string szNote
Additional notes about this user.
Definition: TeamTalk.cs:2131
int nUserData
A user data field which can be used for additional information. The nUserData field of the BearWare....
Definition: TeamTalk.cs:2128
string szInitChannel
User should (manually) join this channel after login. If an initial channel is specified in the user'...
Definition: TeamTalk.cs:2137
UserType uUserType
A bitmask of the type of user based on UserType.
Definition: TeamTalk.cs:2120
string szPassword
The account's password.
Definition: TeamTalk.cs:2118
UserRight uUserRights
A bitmask based on UserRight which specifies the rights the user have who logs onto the server....
Definition: TeamTalk.cs:2124
string szLastModified
Timestamp of last modification of user account. Date/time is converted local time.
Definition: TeamTalk.cs:2155
int[] autoOperatorChannels
Channels where this user will automatically become channel operator when joining. The channels must b...
Definition: TeamTalk.cs:2142
AbusePrevention abusePrevent
Properties which can be set to prevent abuse of a server, e.g. limit number of commands issued.
Definition: TeamTalk.cs:2151
string szUsername
The account's username.
Definition: TeamTalk.cs:2115
int nAudioCodecBpsLimit
Bandwidth restriction for audio codecs created by this user. This value will hold the highest bitrate...
Definition: TeamTalk.cs:2146
A struct containing the properties of a user.
Definition: TeamTalk.cs:2293
int nVolumeVoice
The user's voice volume level. Note that it's a virtual volume which is being set since the master vo...
Definition: TeamTalk.cs:2369
int nStoppedDelayMediaFile
The delay of when a user should no longer be considered playing audio of a media file.
Definition: TeamTalk.cs:2383
int nChannelID
The channel which the user is currently participating in. 0 if none. This value can change as a resul...
Definition: TeamTalk.cs:2327
string szStatusMsg
The user's current status message. Invoke TeamTalkBase.DoChangeStatus() to change this value....
Definition: TeamTalk.cs:2356
int nActiveAdaptiveDelayMSec
The currently active adaptive jitter delay for received voice streams for this user.
Definition: TeamTalk.cs:2419
string szUsername
The szUsername of the user's BearWare.UserAccount. A user account is created by calling TeamTalkBase....
Definition: TeamTalk.cs:2303
int nStoppedDelayVoice
The delay of when a user should no longer be considered as talking.
Definition: TeamTalk.cs:2379
int nVolumeMediaFile
The user's voice volume level. Note that it's a virtual volume which is being set since the master vo...
Definition: TeamTalk.cs:2375
bool[] stereoPlaybackMediaFile
Check what speaker a user is outputting to. If index 0 is TRUE then left speaker is playing....
Definition: TeamTalk.cs:2407
Subscription uPeerSubscriptions
A bitmask of what this user subscribes to from local client instance. Invoking TeamTalkBase....
Definition: TeamTalk.cs:2339
string szIPAddress
The user's IP-address. This value is set by the server.
Definition: TeamTalk.cs:2315
int nUserID
The user's ID. A value from 1 - BearWare.TeamTalkBase.TT_USERID_MAX. This property is set by the serv...
Definition: TeamTalk.cs:2297
string szMediaStorageDir
Store audio received from this user to this folder.
Definition: TeamTalk.cs:2363
uint uVersion
The user's client version. This property is set by the server and will not change after login....
Definition: TeamTalk.cs:2321
string szClientName
The name of the client application which the user is using. This is the value passed as szClientName ...
Definition: TeamTalk.cs:2424
int nBufferMSecVoice
The size of the buffer (in msec) to hold voice content.
Definition: TeamTalk.cs:2411
float[] soundPositionVoice
User's position when using 3D-sound (DirectSound option). Index 0 is x-axis, index 1 is y-axis and in...
Definition: TeamTalk.cs:2389
UserState uUserState
A bitmask of the user's current state, e.g. talking, muted, etc.
Definition: TeamTalk.cs:2359
UserType uUserType
The uUserType of the user's BearWare.UserAccount. This property is set by the server and will not cha...
Definition: TeamTalk.cs:2312
int nStatusMode
The user's current status mode. Invoke TeamTalkBase.DoChangeStatus() to change this value....
Definition: TeamTalk.cs:2350
string szNickname
The user's nickname. Invoking TeamTalkBase.DoChangeNickname() changes this value. Event ClientEvent....
Definition: TeamTalk.cs:2345
float[] soundPositionMediaFile
User's position when using 3D-sound (DirectSound option). Index 0 is x-axis, index 1 is y-axis and in...
Definition: TeamTalk.cs:2395
bool[] stereoPlaybackVoice
Check what speaker a user is outputting to. If index 0 is TRUE then left speaker is playing....
Definition: TeamTalk.cs:2401
int nUserData
The nUserData of the user's BearWare.UserAccount. This field can be use to denote e....
Definition: TeamTalk.cs:2308
Subscription uLocalSubscriptions
A bitmask of what the local user subscribes to from this user. Invoking TeamTalkBase....
Definition: TeamTalk.cs:2333
int nBufferMSecMediaFile
The size of the buffer (in msec) to hold media file content.
Definition: TeamTalk.cs:2415
Packet reception and data statistics for a user.
Definition: TeamTalk.cs:2433
long nMediaFileVideoPacketsRecv
Number of media file video packets received from user. A video frame can consist of several video pac...
Definition: TeamTalk.cs:2455
long nVoicePacketsLost
Number of voice packets lost from user.
Definition: TeamTalk.cs:2437
long nMediaFileAudioPacketsLost
Number of media file audio packets lost from user.
Definition: TeamTalk.cs:2452
long nVideoCaptureFramesLost
Video frames which couldn't be shown because packets were lost.
Definition: TeamTalk.cs:2445
long nMediaFileVideoFramesLost
Media file video frames which couldn't be shown because packets were lost.
Definition: TeamTalk.cs:2460
long nMediaFileVideoFramesDropped
Number of media file video frames dropped because user application didn't retrieve video frames in ti...
Definition: TeamTalk.cs:2463
long nVideoCaptureFramesDropped
Number of video frames dropped because user application didn't retrieve video frames in time.
Definition: TeamTalk.cs:2448
long nVideoCaptureFramesRecv
Number of video frames received from user.
Definition: TeamTalk.cs:2442
long nMediaFileVideoFramesRecv
Number of media file video frames received from user.
Definition: TeamTalk.cs:2457
long nVoicePacketsRecv
Number of voice packets received from user.
Definition: TeamTalk.cs:2435
long nMediaFileAudioPacketsRecv
Number of media file audio packets received from user.
Definition: TeamTalk.cs:2450
long nVideoCapturePacketsRecv
Number of video packets received from user. A video frame can consist of several video packets.
Definition: TeamTalk.cs:2440
A struct containing the properties of a video capture device.
Definition: TeamTalk.cs:683
string szCaptureAPI
The name of the API used to capture video.
Definition: TeamTalk.cs:703
int nVideoFormatsCount
The number of capture formats available in captureFormats array.
Definition: TeamTalk.cs:709
VideoFormat[] videoFormats
The supported capture formats.
Definition: TeamTalk.cs:706
string szDeviceID
A string identifying the device.
Definition: TeamTalk.cs:686
string szDeviceName
The name of the capture device.
Definition: TeamTalk.cs:689
Struct used for specifying the video codec to use.
Definition: TeamTalk.cs:1630
Codec nCodec
Specifies member holds the codec settings. So far there is only one video codec to choose from,...
Definition: TeamTalk.cs:1635
WebMVP8Codec webm_vp8
Definition: TeamTalk.cs:1637
A struct containing the properties of a video capture format.
Definition: TeamTalk.cs:619
int nFPS_Denominator
The denominator of the video capture device's video format. Divinding nFPS_Numerator with nFPS_Denomi...
Definition: TeamTalk.cs:633
FourCC picFourCC
Picture format for capturing.
Definition: TeamTalk.cs:635
int nHeight
The height in pixels of the video device supported video format.
Definition: TeamTalk.cs:625
int nFPS_Numerator
The numerator of the video capture device's video format. Divinding nFPS_Numerator with nFPS_Denomina...
Definition: TeamTalk.cs:629
int nWidth
The width in pixels of the video device supported video format.
Definition: TeamTalk.cs:622
A RGB32 image where the pixels can be accessed directly in an allocated imageBuffer.
Definition: TeamTalk.cs:647
bool bKeyFrame
Whether the image acquired is a key-frame. If it is not a key-frame and there has been packet loss or...
Definition: TeamTalk.cs:664
int nFrameBufferSize
The size in bytes of the buffer allocate in frameBuffer.
Definition: TeamTalk.cs:669
int nHeight
The height in pixels of the image contained in imageBuffer.
Definition: TeamTalk.cs:653
int nStreamID
A unique identifier for the frames which are part of the same video sequence. If the stream ID change...
Definition: TeamTalk.cs:659
System.IntPtr frameBuffer
A buffer allocated internally by TeamTalkBase.
Definition: TeamTalk.cs:666
int nWidth
The width in pixels of the image contained in frameBuffer.
Definition: TeamTalk.cs:650
const int WEBM_VPX_DL_BEST_QUALITY
nEncodeDeadline value for best encoding.
Definition: TeamTalk.cs:1536
const int WEBM_VPX_DL_REALTIME
nEncodeDeadline value for fastest encoding.
Definition: TeamTalk.cs:1530
const int WEBM_VPX_DL_GOOD_QUALITY
nEncodeDeadline value for good encoding.
Definition: TeamTalk.cs:1533
WebM video codec settings.
Definition: TeamTalk.cs:1504
int nRcTargetBitrate
Same as rc_target_bitrate.
Definition: TeamTalk.cs:1507
uint nEncodeDeadline
Time that should be spent on encoding a frame.
Definition: TeamTalk.cs:1523
int rc_target_bitrate
Target bitrate in kbits/sec. This value must be greater than 0.
Definition: TeamTalk.cs:1514
Configuration of WebRTC's echo canceller. See also TT_SetSoundDeviceEffects()
Definition: TeamTalk.cs:1285
bool bEnable
Enable WebRTC echo canceller. The WebRTC echo canceller requires sound input and output devices are i...
Definition: TeamTalk.cs:1291
Gain level for AGC. Only active when bEnable is true.
Definition: TeamTalk.cs:1337
float fGainDB
Gain level in dB. Range: 0 <= x < 50. Default: 0.
Definition: TeamTalk.cs:1340
Configuration of WebRTC's gain controller 2 for AGC.
Definition: TeamTalk.cs:1329
bool bEnable
Enable WebRTC's fixed digital gain. WebRTC's automatic gain control (AGC)
Definition: TeamTalk.cs:1332
Configuration of WebRTC's level estimater.
Definition: TeamTalk.cs:1367
bool bEnable
Enable level estimater. When enabled TeamTalkBase.GetSoundInputLevel() will return a value based on W...
Definition: TeamTalk.cs:1373
Configuration of WebRTC's noise suppression. See also BearWare.SpeexDSP.
Definition: TeamTalk.cs:1299
int nLevel
Noise suppression level. 0 = Low, 1 = Moderate, 2 = High, 3 = VeryHigh. Default: 1.
Definition: TeamTalk.cs:1304
bool bEnable
Enable WebRTC noise suppression.
Definition: TeamTalk.cs:1301
Configuration of WebRTC pre-amplifier.
Definition: TeamTalk.cs:1272
bool bEnable
Enable pre-amplifier. Replacement for TT_SetSoundInputGainLevel()
Definition: TeamTalk.cs:1275
float fFixedGainFactor
Gain factor. Default: 1.
Definition: TeamTalk.cs:1277
Configuration of WebRTC's voice detection.
Definition: TeamTalk.cs:1311
bool bEnable
Use WebRTC's voice detection to trigger BearWare.TeamTalkBase.OnVoiceActivation.
Definition: TeamTalk.cs:1321
WebRTC's audio preprocessor.
Definition: TeamTalk.cs:1268
GainController2 gaincontroller2
Definition: TeamTalk.cs:1362
WebRTCAudioPreprocessor(bool set_defaults)
Definition: TeamTalk.cs:1377
NoiseSuppression noisesuppression
Definition: TeamTalk.cs:1306
LevelEstimation levelestimation
Definition: TeamTalk.cs:1375
Default values for BearWare.WebRTCAudioPreprocessor.
Definition: TeamTalk.cs:1430
const float DEFAULT_WEBRTC_EXTRA_SAT_MARGIN_DB
Definition: TeamTalk.cs:1439
const float DEFAULT_WEBRTC_MAXGAIN_DBSEC
Definition: TeamTalk.cs:1440
const float DEFAULT_WEBRTC_PREAMPLIFIER_GAINFACTOR
Definition: TeamTalk.cs:1432
const bool DEFAULT_WEBRTC_NOISESUPPRESS_ENABLE
Definition: TeamTalk.cs:1442
const bool DEFAULT_WEBRTC_VAD_ENABLE
Definition: TeamTalk.cs:1433
const bool DEFAULT_WEBRTC_PREAMPLIFIER_ENABLE
Definition: TeamTalk.cs:1431
const bool DEFAULT_WEBRTC_SAT_PROT_ENABLE
Definition: TeamTalk.cs:1437
const bool DEFAULT_WEBRTC_GAINCTL_ENABLE
Definition: TeamTalk.cs:1435
const float WEBRTC_GAINCONTROLLER2_FIXEDGAIN_MAX
Definition: TeamTalk.cs:1445
const float DEFAULT_WEBRTC_GAINDB
Definition: TeamTalk.cs:1436
const bool DEFAULT_WEBRTC_ECHO_CANCEL_ENABLE
Definition: TeamTalk.cs:1444
const bool DEFAULT_WEBRTC_LEVELESTIMATION_ENABLE
Definition: TeamTalk.cs:1434
const float DEFAULT_WEBRTC_INIT_SAT_MARGIN_DB
Definition: TeamTalk.cs:1438
const float DEFAULT_WEBRTC_MAX_OUT_NOISE
Definition: TeamTalk.cs:1441
const int DEFAULT_WEBRTC_NOISESUPPRESS_LEVEL
Definition: TeamTalk.cs:1443