voiceSetVolume (Function)

Top  Previous  Next

Architecture:

X32 / NX32

Device support:

MX2 turbo/encore/warp, AX9 turbo/encore, DX4i pro-2G mk2

Firmware version:

4.56


Controls the volume level used by voiceTalk when playing messages during a voice session.

The volume level does not refer to an absolute level and may vary between different device types.

 

Input:                

volume: SINT (0..100) Default 50

Playback volume.

 

Returns: INT

0

- Operation was successful.

1

- Invalid volume

3

- General error

5

- Not supported on this device.

 

Declaration:

FUNCTION voiceSetVolume : INT;
VAR_INPUT
  volume : SINT := 50;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Set the voice message playback volume
voiceSetVolume(volume := 90);
 
// Turn on power to the GSM module
gsmPower(power := TRUE);
...
BEGIN
  ...
  // Play the "Welcome" message
  voiceTalk(message := "Welcome.wav");
  ...
END;
 
END_PROGRAM;