Download MetaTrader 5

PlaySound

It plays a sound file.

bool  PlaySound(
   string  filename      // file name
   );

Parameters

filename

[in]  Path to a sound file. If filename=NULL, the playback is stopped.

Return Value

true — if the file is found, otherwise - false.

Note

The file must be located in terminal_directory\Sounds or its sub-directory. Only WAV files are played.

Call of PlaySound() with NULL parameter stops playback.

PlaySound() function does not work in the Strategy Tester.

See also

Resources


Updated: 2015.12.03