Jump to content
RealModScene
Sign in to follow this  
felida

Music/sounds via lua

Recommended Posts

Ok, so after a bit of tinkering with my skin creations.. i happened to come across

https://docs.coronalabs.com/api/library/audio/play.html

So since lua scripts are already intigrated into aurora.. would there be support for this type of thing? Eg select your filter type and designated song plays?? Or would this be more so a 0.6b thing since scripts are more integrated?

I ask because im no coder by any means lol.. just thought it would be easier/different approach to adding music/sounds to skins.. as long as you know how to lua.. lol

  • Like 2

Share this post


Link to post
Share on other sites

Assuming that phoenix integrated a full LUA interpreter with all of the associated librarys, it should work. For utility like options, I cant really see audio being big on the list, but then again, if there are alerts for said script I could see it being that way. also, I dont know if it will be an option to integrate scripts into themes, and if so, how you would get XUI to trigger them, unless, you could add a function to the button press. as of now, the buttons in XUI are given a name, and in aurora, it checks for state changes, or button presses, and then runs the associated code in the background. the easiest way I can think of to do that is to A. run the script in the background on a loop, and always check(polling), for changes in skin timing, etc. or B. have the skin call functions in a LUA script that would then call functions that were normally called, and also run your code. Just a couple of thoughts on the matter.

 

There is also the song loop issue, and if you write the script to replay a song, you also have to write code for it to stop playing that song, when you change tabs, and then play a new song. This would be as simple as creating a boolean variable for each tab, and when selecting the tab you want, you have it set that one to true, and the rest to false, then use a switch() statment(C#/VB.net example, not sure about lua terminology), in a loop, and have the tab selection change the boolean values.

 

Just a few ideas, but once again, I do not know the extent of LUA in 0.6b.

Share this post


Link to post
Share on other sites

Did you try it out?

I dont have 0.6b, I am not a tester for aurora, so I couldnt try it out even if I wanted to. Every thing I said was theoretical, as I have no idea the extent of LUA in aurora in 0.6b. there are a lot of different libraries you can add to LUA, and I do not know how many of them will be integrated into the utility scripting feature.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...