Page 1 of 1
audio
Posted: Mon Nov 15, 2021 5:15 pm
by Samuele
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
Re: audio
Posted: Mon Nov 15, 2021 5:58 pm
by Klaus
On the mobile platform imported audioclips are not supported, if that is what you mean with "audio library".
Re: audio
Posted: Tue Nov 16, 2021 10:07 am
by Samuele
no, i made it especially for mobile (and it works) but how can i save as standalone with audio?
Re: audio
Posted: Tue Nov 16, 2021 10:33 am
by Klaus
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
Re: audio
Posted: Tue Nov 16, 2021 7:44 pm
by Samuele
sorry, where do i write that?
Re: audio
Posted: Tue Nov 16, 2021 8:06 pm
by Klaus
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.
The screenshot has nothing to with this.
Re: audio
Posted: Wed Nov 17, 2021 11:41 am
by Samuele
ahhh ok thanks