nmpSetVolume (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i pro, CX1 pro/flex/warp, SX1, MX2 turbo, NX-200, NX-400, NX-900, LX2

Firmware version:

2.84 / 1.00.00

Nav. API level:

2


This function will mute or un-mute the PNM device.

 

Input:

volume : SINT (-1..100)

0

- The volume will be muted

-1

- The volume level will be restored.

1..100

- Currently not used but reserved for setting volume level directly.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- Failed to set volume.

-8

- Volume out of range.

-11

- This is not supported by the device (e.g. the device is not an NMP device).

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpSetVolume : INT;
VAR_INPUT
  volume   : SINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
BEGIN
  ...
  //Mute sound
  nmpSetVolume(volume := 0);
  ...
END;
END_PROGRAM;