Where do copied files go on mobile?
Mark Talluto
mark at canelasoftware.com
Mon Apr 20 14:00:47 EDT 2020
> On Apr 19, 2020, at 9:37 AM, Graham Samuel via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi Klaus
>
> Thanks for your continued interest. In fact I got it working! As stated earlier, I converted my sound to .m4a (there are internet services for this kind of conversion) and included it in the Standalone Copy Files section.
>
> I have this in the OpenStack handler of the main stack of the app (there is only one stack).
>
> put specialFolderPath("resources") & “/MySound.m4a" into tBeepPath
> set the beepsound to tBeepPath
> beep 3 — as a test
>
> I ran it on the iPhone simulator and it did beep! I have something wrong further on in my app when the beep is supposed to react as an alarm, but it isn’t the sound itself.
>
> I am struggling with these additional problems and will almost certainly be asking for more advice shortly!
>
> Thanks again for your help.
>
> Graham
Hi Graham,
I am working on a simple mobile app that is using the sensors and playback of sound as you are.
Using .m4a is perfect for mobile.
The code to play your sound is: play tPath —tPath is the full path to your sound file.
My file structure is as follows:
A bunch of iOS related directories (which you can ignore)
myApp.app/sounds/lambo/start.m4a
I use the following function to build my path to that sound file:
function csi_soundDirectory
local tPath
--USEFUL FOR GETTING THE ROOT FOLDER OF THIS APP
set the itemDel to slash
put specialFolderPath("resources") & slash into tPath
return tPath & "/sounds/" & sVehicle —in this example sVehicle contains “lambo"
end csi_soundDirectory
Best regards,
Mark Talluto
livecloud.io <http://livecloud.io/>
nursenotes.net <http://nursenotes.net/>
canelasoftware.com <http://www.canelasoftware.com/>
More information about the use-livecode
mailing list