One of the features available in the Multi-Media applications is the ability to play a digital audio file. These are commonly used to provide an audible alert. This example will demonstrate how to play a digital audio file which is referred to as an Audible Alert in PowerVision.
Download the example configuration created in PowerVision 4.791 for a PV1100 Connected display.
Download the Audible Alert audio file AlarmEffect.mp3.
Digital Audio File Format
The digital audio player will play almost all formats of audio file including mp1, mp2, mp3, m4a, mpg, mpeg, mpeg3, acc, wav, wma, 3gpp, 3gpp2 and a host of x-mxx files.
Playing an Audible Alert
- Attach Audio File - Go to the Library->Customer Extensions tab and load the mp3 audio file. This will embed the file into the file system.
- Select File to Play - Load the file path and file name into the string variable Media.AudioAlertFilePath default value box. The path will always be /fs/etfs/config/current/CustomerExtensions/AlarmEffect.mp3. Change the name of the file as needed. Change the string variable Length to 64 or more to contain all the characters used in the path name. See reference image below. If more than one file needs to be played then use script functions to load the file path into the string.
- Setup Audio - Follow the steps outlined in the Audio Output Setup Tutorial
- Select Audio Source - Fire the action MediaApp->SelectMediaSource(AudioAlerts)
- Play Alert - Call the action MediaApp->PlayAudioAlert(Empty) to play the file linked to. The file will play one time then stop.
- Cancel Alert - To stop playing the alert audio file fire the action MediaApp->CancelPlayAudioAlert(empty).
- Repeat - To repeat playing the same file simply call the PlayAudioAlert action again.
Audio Alert File Path Variable
Comments
0 comments
Please sign in to leave a comment.