PortSIP VoIP SDK Manual for Mac  15.1
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

(int) - PortSIPSDK::getNumOfVideoCaptureDevices
 Gets the number of available capturing devices. More...
 
(int) - PortSIPSDK::getVideoCaptureDeviceName:uniqueId:deviceName:
 Gets the name of a specific video capturing device given by an index. More...
 
(int) - PortSIPSDK::getNumOfRecordingDevices
 Gets the number of audio devices available for audio recording. More...
 
(int) - PortSIPSDK::getNumOfPlayoutDevices
 Gets the number of audio devices available for audio playout. More...
 
(NSString *) - PortSIPSDK::getRecordingDeviceName:
 Get the name of a specific recording device given by an index. More...
 
(NSString *) - PortSIPSDK::getPlayoutDeviceName:
 Get the name of a specific playout device given by an index. More...
 
(int) - PortSIPSDK::setSpeakerVolume:
 Set the speaker volume level. More...
 
(int) - PortSIPSDK::getSpeakerVolume
 Gets the speaker volume. More...
 
(int) - PortSIPSDK::setSystemOutputMute:
 Mutes the speaker device completely in the OS. More...
 
(BOOL) - PortSIPSDK::getSystemOutputMute
 Retrieves the output device mute state in the operating system. More...
 
(int) - PortSIPSDK::setMicVolume:
 Sets the microphone volume level. More...
 
(int) - PortSIPSDK::getMicVolume
 Retrieves the current microphone volume. More...
 
(int) - PortSIPSDK::setSystemInputMute:
 Mute the microphone input device completely in the OS. More...
 
(BOOL) - PortSIPSDK::getSystemInputMute
 Gets the mute state of the input device in the operating system. More...
 
(void) - PortSIPSDK::audioPlayLoopbackTest:
 Used for the loop back test for audio device. More...
 

Detailed Description

Function Documentation

§ getNumOfVideoCaptureDevices()

- (int) getNumOfVideoCaptureDevices

Gets the number of available capturing devices.

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

§ getVideoCaptureDeviceName:uniqueId:deviceName:()

- (int) getVideoCaptureDeviceName: (int)  index
uniqueId: (NSString **)  uniqueIdUTF8
deviceName: (NSString **)  deviceNameUTF8 

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

Parameters
indexDevice index (0, 1, 2, ..., N-1), of which 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.
deviceNameUTF8A character buffer to which the device name will be copied as a null-terminated string in UTF-8 format.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

§ getNumOfRecordingDevices()

- (int) getNumOfRecordingDevices

Gets the number of audio devices available for audio recording.

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

§ getNumOfPlayoutDevices()

- (int) getNumOfPlayoutDevices

Gets the number of audio devices available for audio playout.

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

§ getRecordingDeviceName:()

- (NSString*) getRecordingDeviceName: (int)  index

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

Parameters
indexDevice index (0, 1, 2, ..., N-1), of which N is given by getNumOfRecordingDevices (). Also -1 is a valid value and will return the name of the default recording device.
Returns
A NSString to which the device name will be copied as a null-terminated string in UTF-8 format.

§ getPlayoutDeviceName:()

- (NSString*) getPlayoutDeviceName: (int)  index

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

Parameters
indexDevice index (0, 1, 2, ..., N-1), of which N is given by getNumOfPlayoutDevices (). Also -1 is a valid value and will return the name of the default playout device.
Returns
A NSString to which the device name will be copied as a null-terminated string in UTF8 format.

§ setSpeakerVolume:()

- (int) setSpeakerVolume: (int)  volume

Set the speaker volume level.

Parameters
volumeVolume 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()

- (int) getSpeakerVolume

Gets the speaker volume.

Returns
If the function succeeds, it will return the value of speaker volume that ranges 0 - 255. If the function fails, it will return a specific error code.

§ setSystemOutputMute:()

- (int) setSystemOutputMute: (BOOL)  enable

Mutes the speaker device completely in the OS.

Parameters
enableIf it's set to true, the device output is muted. If set to false, the output is unmuted.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

§ getSystemOutputMute()

- (BOOL) getSystemOutputMute

Retrieves the output device mute state in the operating system.

Returns
If it returns true, the output device is muted. If false, the output device is not muted.

§ setMicVolume:()

- (int) setMicVolume: (int)  volume

Sets the microphone volume level.

Parameters
volumeThe microphone volume. The 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.

§ getMicVolume()

- (int) getMicVolume

Retrieves the current microphone volume.

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

§ setSystemInputMute:()

- (int) setSystemInputMute: (BOOL)  enable

Mute the microphone input device completely in the OS.

Parameters
enableIf it's set to true, the input device is muted. If false it is unmuted.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

§ getSystemInputMute()

- (BOOL) getSystemInputMute

Gets the mute state of the input device in the operating system.

Returns
If it returns true, the input device is muted. If false, the input device is not muted.

§ audioPlayLoopbackTest:()

- (void) audioPlayLoopbackTest: (BOOL)  enable

Used for the loop back test for audio device.

Parameters
enableSet to true to start audio look back test, or false to stop.