startSound()
Plays a WAV file.
Synopsis
bool startSound(string wavFileName [, bool loopSound = FALSE]);
Parameters
Parameter | Description |
---|---|
wavFileName | File name of the file to be played. An absolute path is necessary. |
loopSound | Option for playing in a continuous loop. |
Return value
Returns "TRUE" if the file could be started, otherwise "FALSE".
Description
Allows WAV files to be played. If the optional parameter loopSound is set to "TRUE", the file is played in a continuous loop until it is ended with stopSound(), but the current thread is not stopped. Playing of the WAV file can be stopped in a different thread from where it was started.
Example
main()
{
startSound(WINCCOA_PATH+"data/sounds/DOORBELL.wav", TRUE);
delay(120);
stopSound();
}
Assignment
Miscellaneous functions
Availability
CTRL