iX Talk
http://beijerinc.com/support/ix/forum/

Play mp3 When Alarm Triggered
http://beijerinc.com/support/ix/forum/viewtopic.php?f=24&t=1917
Page 1 of 1

Author:  Kyle W. [ Wed Jun 10, 2015 2:20 pm ]
Post subject:  Play mp3 When Alarm Triggered

This sample program will play a .mp3 file when an alarm is triggered. It will loop the sound and keep playing until the alarm is either acknowledged or the condition is cleared. The project takes advantage of aliasing so that there is only one screen with the media player on it, but three instances corresponding to the three alarms. Instead of giving the media player a file location, you use the general dynamic property of "Source" and point that to the alias. Each alias instance takes the source from the tag the instance references.

This project was created for a PC application and can play all three alarm sounds at the same time. If used on a panel (only TxB or TxC panels have an audio jack) it will only play the audio once and may need additional coding.

To use this project you will need to replace the initial value of the three String tags that have the location of the audio file.

This project was compiled using iX Developer 2.10 SP3 (2.16.154).

Attachments:
AlarmPlayAudioPC.zip [91.11 KiB]
Downloaded 1734 times

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/