Difference between revisions of "Block Audio"

From IPLOG
Jump to: navigation, search
(AUDIO_PLAY_FILE)
(Audio library)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== [[Libraries for IEC 61131-3|Back to Libraries]] ==
 
== Audio library ==
 
== Audio library ==
  
Line 6: Line 7:
 
Plays audio file on given path
 
Plays audio file on given path
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]]
+
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
|-
 
|-
 
|in
 
|in
Line 16: Line 17:
 
'''Example:'''<br>
 
'''Example:'''<br>
 
[[File:Block Audio play File.png]]<br>
 
[[File:Block Audio play File.png]]<br>
Note: plays aaa.mp3 file in folder "home"
+
Note: plays abc.mp3 file in folder "home"
  
 
==== AUDIO_PLAY_HTTP ====
 
==== AUDIO_PLAY_HTTP ====
 
Plays http audio stream on given url
 
Plays http audio stream on given url
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]]
+
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
|-
 
|-
 
|in
 
|in
Line 35: Line 36:
 
Stops actual playback
 
Stops actual playback
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]]
+
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
|}
 
|}
 
'''Example:'''<br>
 
'''Example:'''<br>
Line 45: Line 46:
 
Sets volume to left and right audio channel
 
Sets volume to left and right audio channel
 
{| class="wikitable"
 
{| class="wikitable"
| colspan="5" |[[#Asynchronous operations|Asynchronous interface]]
+
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
|-
 
|-
 
|in
 
|in

Latest revision as of 07:24, 30 April 2020

Back to Libraries

Audio library

Playback

AUDIO_PLAY_FILE

Plays audio file on given path

Asynchronous interface
in FILENAME string file (with whole path) to play

Example:
Block Audio play File.png
Note: plays abc.mp3 file in folder "home"

AUDIO_PLAY_HTTP

Plays http audio stream on given url

Asynchronous interface
in URL string url to audio stream

Example:
Block Audio play HTTP.png

AUDIO_STOP

Stops actual playback

Asynchronous interface

Example:
Block Audio stop.png

Configuration

AUDIO_VOLUME

Sets volume to left and right audio channel

Asynchronous interface
in VOL_L uint percent volume for left channel
in VOL_R uint percent volume for right channel

Example:
Block Audio Volume configuration .png
Note: Volume set to 50% in the example.