Lua audio library

Moderator: admin

Lua audio library

Postby Timon55 » Fri Jan 27, 2012 3:39 am

As far as we know, only strategies can play sound. But I saw a couple of requests from users to add a sound alert to some indicator. So I decide to find some external library for playing sounds in lua.

After some search I found proteAudio library (http://viremo.eludi.net/proteaAudio/) which give an ability to play sound files right from Lua! But unfortunately standard build of proteAudio.dll linked to the lua51.dll, but FXTS2 is using Lua5.1.dll. So I make a custom build of proteAudio which using Lua5.1.dll instead of lua51.dll.

You will find proteaAudio library in attachment(into proteaAudio.zip with sample sound file included)
Also you can find a simple example of using this library and in attachment.
To run example you need to copy proAudioRt.dll and sample.ogg files to the FXTS2 root folder(just put its near the FXTSpp.exe) and install attached sound_test.lua indicator. Sound will be played right after you add indicator to chart.
Attachments
proteaAudio.zip
(91.07 KiB) Downloaded 656 times
sound_test.lua
(922 Bytes) Downloaded 729 times
Timon55
FXCodeBase: Confirmed User
 
Posts: 43
Joined: Thu Jul 15, 2010 5:35 am
Location: Omsk

Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 53 guests