Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_StartVoiceCom

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    POINTERHANDLE NET_SDK_StartVoiceCom(
        LONG lUserID,
        BOOL bNeedCBNoEncData,
        TALK_DATA_CALLBACK fVoiceDataCallBack,
        void* pUser,
        LONG lChannel = -1);

    1
    2
    3
    4
    5
    6
    public static extern POINTERHANDLE NET_SDK_StartVoiceCom(
        int lUserID,
        bool bNeedCBNoEncData,
        TALK_DATA_CALLBACK fVoiceDataCallBack,
        IntPtr pUser,
        int lChannel = -1);

### Function Description

Start voice intercom.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
bNeedCBNoEncDatain | BOOL | Whether the local voice data needs to be encoded when callback, select TRUE, the stream from the device is directly callback. Select FALSE, the stream from the device is decoded before callback.
fVoiceDataCallBackin | `TALK_DATA_CALLBACK` | Audio data callback function.
pUserin | void* | User-defined parameters.
lChannelin | LONG | Channel number, starting from 0. This parameter is invalid for IPC devices.

### Return Value

- Type：POINTERHANDLE

- Remark：-1 indicates failure, and other values ​​are used as the voice intercom handle.

### Remarks

None

Error Code