PortSIP VoIP SDK Manual for Windows  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Device Manage functions.

Functions

Int32 PortSIP.PortSIPLib.getNumOfRecordingDevices ()
 Gets the count of audio devices available for audio recording. More...
 
Int32 PortSIP.PortSIPLib.getNumOfPlayoutDevices ()
 Gets the number of audio devices available for audio playout. More...
 
Int32 PortSIP.PortSIPLib.getRecordingDeviceName (Int32 deviceIndex, StringBuilder nameUTF8, Int32 nameUTF8Length)
 Gets the name of a specific recording device given by an index. More...
 
Int32 PortSIP.PortSIPLib.getPlayoutDeviceName (Int32 deviceIndex, StringBuilder nameUTF8, Int32 nameUTF8Length)
 Get the name of a specific playout device given by an index. More...
 
Int32 PortSIP.PortSIPLib.setSpeakerVolume (Int32 volume)
 Set the speaker volume level. More...
 
Int32 PortSIP.PortSIPLib.getSpeakerVolume ()
 Gets the speaker volume level. More...
 
Int32 PortSIP.PortSIPLib.setMicVolume (Int32 volume)
 Sets the microphone volume level. More...
 
Int32 PortSIP.PortSIPLib.getMicVolume ()
 Retrieves the current microphone volume. More...
 
void PortSIP.PortSIPLib.audioPlayLoopbackTest (Boolean enable)
 Use it for the audio device loop back test. More...
 
Int32 PortSIP.PortSIPLib.getNumOfVideoCaptureDevices ()
 Get the number of available capturing devices. More...
 
Int32 PortSIP.PortSIPLib.getVideoCaptureDeviceName (Int32 deviceIndex, StringBuilder uniqueIdUTF8, Int32 uniqueIdUTF8Length, StringBuilder deviceNameUTF8, Int32 deviceNameUTF8Length)
 Get the name of a specific video capture device given by an index. More...
 
Int32 PortSIP.PortSIPLib.showVideoCaptureSettingsDialogBox (String uniqueIdUTF8, Int32 uniqueIdUTF8Length, String dialogTitle, IntPtr parentWindow, Int32 x, Int32 y)
 Display the capture device property dialog box for the specified capture device. More...
 

Detailed Description

Function Documentation

◆ getNumOfRecordingDevices()

Int32 PortSIP.PortSIPLib.getNumOfRecordingDevices ( )

Gets the count of audio devices available for audio recording.

Returns
It will return the count of recording devices. If the function fails, it will return a specific error code less than 0.

◆ getNumOfPlayoutDevices()

Int32 PortSIP.PortSIPLib.getNumOfPlayoutDevices ( )

Gets the number of audio devices available for audio playout.

Returns
It will return the count of playout devices. If the function fails, it will return a specific error code less than 0.

◆ getRecordingDeviceName()

Int32 PortSIP.PortSIPLib.getRecordingDeviceName ( Int32  deviceIndex,
StringBuilder  nameUTF8,
Int32  nameUTF8Length 
)

Gets the name of a specific recording device given by an index.

Parameters
deviceIndexDevice index (0, 1, 2, ..., N-1), where N is given by getNumOfRecordingDevices (). Also -1 is a valid value and will return the name of the default recording device.
nameUTF8A character buffer to which the device name will be copied as a null-terminated string in UTF-8 format.
nameUTF8LengthThe size of nameUTF8 buffer. It cannot be less than 128.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ getPlayoutDeviceName()

Int32 PortSIP.PortSIPLib.getPlayoutDeviceName ( Int32  deviceIndex,
StringBuilder  nameUTF8,
Int32  nameUTF8Length 
)

Get the name of a specific playout device given by an index.

Parameters
deviceIndex
deviceIndexDevice index (0, 1, 2, ..., N-1), where N is given by getNumOfRecordingDevices (). Also -1 is a valid value and will return the name of the default recording device.
nameUTF8A character buffer to which the device name will be copied as a null-terminated string in UTF-8 format.
nameUTF8LengthThe size of nameUTF8 buffer. It cannot be less than 128.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ setSpeakerVolume()

Int32 PortSIP.PortSIPLib.setSpeakerVolume ( Int32  volume)

Set the speaker volume level.

Parameters
volumeVolume level of speaker. Valid value ranges 0 - 255.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ getSpeakerVolume()

Int32 PortSIP.PortSIPLib.getSpeakerVolume ( )

Gets the speaker volume level.

Returns
If the function succeeds, it will return the speaker volume with valid range 0 - 255. If the function fails, it will return a specific error code.

◆ setMicVolume()

Int32 PortSIP.PortSIPLib.setMicVolume ( Int32  volume)

Sets the microphone volume level.

Parameters
volumeThe microphone volume level. Valid value ranges 0 - 255.
Returns
If the function succeeds, the return value is 0. If the function fails, the return value is a specific error code.

◆ getMicVolume()

Int32 PortSIP.PortSIPLib.getMicVolume ( )

Retrieves the current microphone volume.

Returns
If the function succeeds, it will return the microphone volume. If the function fails, it will return a specific error code.

◆ audioPlayLoopbackTest()

void PortSIP.PortSIPLib.audioPlayLoopbackTest ( Boolean  enable)

Use it for the audio device loop back test.

Parameters
enableSet to true to start audio look back test; or fase to stop.

◆ getNumOfVideoCaptureDevices()

Int32 PortSIP.PortSIPLib.getNumOfVideoCaptureDevices ( )

Get the number of available capturing devices.

Returns
It will return the count of video capturing devices. If it fails, it will return a specific error code less than 0.

◆ getVideoCaptureDeviceName()

Int32 PortSIP.PortSIPLib.getVideoCaptureDeviceName ( Int32  deviceIndex,
StringBuilder  uniqueIdUTF8,
Int32  uniqueIdUTF8Length,
StringBuilder  deviceNameUTF8,
Int32  deviceNameUTF8Length 
)

Get the name of a specific video capture device given by an index.

Parameters
deviceIndexDevice index (0, 1, 2, ..., N-1), where N is given by getNumOfVideoCaptureDevices (). Also -1 is a valid value and will return the name of the default capturing device.
uniqueIdUTF8Unique identifier of the capturing device.
uniqueIdUTF8LengthSize in bytes of uniqueIdUTF8.
deviceNameUTF8A character buffer to which the device name will be copied as a null-terminated string in UTF-8 format.
deviceNameUTF8LengthThe size of nameUTF8 buffer. It cannot be less than 128.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ showVideoCaptureSettingsDialogBox()

Int32 PortSIP.PortSIPLib.showVideoCaptureSettingsDialogBox ( String  uniqueIdUTF8,
Int32  uniqueIdUTF8Length,
String  dialogTitle,
IntPtr  parentWindow,
Int32  x,
Int32  y 
)

Display the capture device property dialog box for the specified capture device.

Parameters
uniqueIdUTF8Unique identifier of the capture device.
uniqueIdUTF8LengthSize in bytes of uniqueIdUTF8.
dialogTitleThe title of the video settings dialog.
parentWindowParent window used for the dialog box. It should originally be a HWND.
xHorizontal position for the dialog relative to the parent window, in pixels.
yVertical position for the dialog relative to the parent window, in pixels.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.