PlaySound Function

Overview

Plays a specified sound file.

Signature

bool PlaySound(string filename);

Parameters

  • filename (string, [in]): Path to the sound file. If NULL, playback stops.
  • Return Value

  • true: If the file is found.
  • false: Otherwise.
  • Notes

  • The sound file must be located in the terminal_directory\Sounds folder or a sub-directory thereof.
  • Only .wav files are supported.
  • Calling PlaySound(NULL) will stop any currently playing sound.
  • This function is not operational within the Strategy Tester.
  • See Also

  • [Resources](/runtime/resources)
  • [PeriodSeconds](/common/periodseconds)
  • [Print](/common/print)