audio

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Samuele
Posts: 79
Joined: Mon Oct 11, 2021 7:05 pm

audio

Post by Samuele » Mon Nov 15, 2021 5:15 pm

hi, how can i save as standalone but with audio?
the stack has already its audio library and it works on the computer but on mobile it gives me the "could not find file" error
thanks

Klaus
Posts: 12591
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: audio

Post by Klaus » Mon Nov 15, 2021 5:58 pm

On the mobile platform imported audioclips are not supported, if that is what you mean with "audio library".

Samuele
Posts: 79
Joined: Mon Oct 11, 2021 7:05 pm

Re: audio

Post by Samuele » Tue Nov 16, 2021 10:07 am

no, i made it especially for mobile (and it works) but how can i save as standalone with audio?

Klaus
Posts: 12591
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: audio

Post by Klaus » Tue Nov 16, 2021 10:33 am

Buongiorno Samuele,

oh, scusi, sounded like imported soundfiles.

OK, so you will probably have a folder with all of your audio files e.g. "sounds".
Add this folder (and all other files you need to add to your standalone) via the "Copy files" tab in the
"Standalone application Settings" (Menu -> File).

Then you will find these files on EVERY platform (yes, on desktop and mobile!) in your standalone
here -> specialfolderpath("resources")

Example mobile snippet:

Code: Select all

...
put specialfolderpath("resources") & "/sounds/your_sound.mp3" into tSoundFile
play file tSoundFile
...
This specialfolderpath will also work in the IDE, here it gives you the folder the current stack resides in.


Best

Klaus

Samuele
Posts: 79
Joined: Mon Oct 11, 2021 7:05 pm

Re: audio

Post by Samuele » Tue Nov 16, 2021 7:44 pm

sorry, where do i write that?
Attachments
Screen Shot 2021-11-16 at 19.44.12.png

Klaus
Posts: 12591
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: audio

Post by Klaus » Tue Nov 16, 2021 8:06 pm

Samuele wrote:
Tue Nov 16, 2021 7:44 pm
sorry, where do i write that?
Whenever you want to play one of your sounds!
Maybe in a button or whatever, I have no idea of your app. 8)

The screenshot has nothing to with this.

Samuele
Posts: 79
Joined: Mon Oct 11, 2021 7:05 pm

Re: audio

Post by Samuele » Wed Nov 17, 2021 11:41 am

ahhh ok thanks

Post Reply

Return to “Android Deployment”