Playing Sound In Android.

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Playing Sound In Android.

Post by Googie85 » Sun Jan 10, 2021 4:18 am

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.

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

Re: Playing Sound In Android.

Post by Klaus » Sun Jan 10, 2021 3:34 pm

You will find them in -> specialfolderpath("resources")
On ANY platform!

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: Playing Sound In Android.

Post by SparkOut » Sun Jan 10, 2021 4:35 pm

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.

Post Reply

Return to “Android Deployment”