Page 1 of 1

Playing Sound In Android.

Posted: Sun Jan 10, 2021 4:18 am
by Googie85
Hi Guys!!

I have the following code,

Code: Select all

on mouseDown
   put specialFolderPath("engine") & "/Applause.wav" into tSoundFile
   play tSoundFile

   put specialFolderPath("documents") & "/Applause.wav" into tSoundFile
   play tSoundFile
end mouseDown
I have included the audio files in the Standalone Application Settings/Copy Files menu. No luck... Any ideas??

Many Thanks,

Googie.

Re: Playing Sound In Android.

Posted: Sun Jan 10, 2021 3:34 pm
by Klaus
You will find them in -> specialfolderpath("resources")
On ANY platform!

Re: Playing Sound In Android.

Posted: Sun Jan 10, 2021 4:35 pm
by SparkOut
Also note the Android file system is case sensitive, so ensure that specialFolderPath("resources") is lower case, and verify that the Applause.wav file really starts with a capital A.
The other thing to question is whether you included the sound files by individually adding them in the 'copy files" section, or did you include them all in a folder? In which case

Code: Select all

specialFolderPath("resources") & "/soundsfoldername/Applause.wav"
is the approach to take.