voiceSetChannel (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2 turbo/encore/warp, DX4i pro, NX-200, NX-400

Firmware version:

4.00 (4.10 for DX4i pro) / 1.00.00


This function is used to select where the voice output should be routed to.

By default the voice will be routed to the GSM connection for voice/DTMF use, but it can also be routed to the xVoice output available on some devices. Please consult the technical manual for more information.

Using xVoice it is possible to play digitized voice to an external speaker.

 

Input:

ch : SINT (0..1) Default 0

The channel to route the output to.

0

- GSM

1

- xVoice output

 

Returns: INT

0

- Operation  was successful.

1

- Invalid channel.

5

- Not supported on this device.

 

Declaration:

FUNCTION voiceSetChannel : INT;
VAR_INPUT
  ch : SINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Switch to external voice output
  voiceSetChannel(ch := 1);
  // Play the "Welcome" message
  voiceTalk(message := "Welcome.wav");
  ...
END;
 
END_PROGRAM;