Wav file not playing on android

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
abanowBUSTfGf
Posts: 63
Joined: Sat Dec 22, 2012 3:01 am

Wav file not playing on android

Post by abanowBUSTfGf » Wed Jan 02, 2013 2:29 pm

I am trying to play a wav file that works on live code on a samsung android but am having no success at all.
Any suggestions?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Wav file not playing on android

Post by Klaus » Wed Jan 02, 2013 3:28 pm

Hi abanowBUSTfGf,

1. welcome to the forum! :D

2. how do you "play" the file?
Can you post your script(s) please?

Hint:
Internal (= imported) sound do not work (=play) on mobile platforms,
you need to use a file!


Best

Klaus

abanowBUSTfGf
Posts: 63
Joined: Sat Dec 22, 2012 3:01 am

Re: Wav file not playing on android

Post by abanowBUSTfGf » Thu Jan 03, 2013 8:31 am

Hi,
I import the .WAV files into the Livecode system and to play
when clicking on an image, I use the following code.

on mouseup
play audioclip "aerosol.au"
end mouseup

Any help would be welcome
Tx

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Wav file not playing on android

Post by Klaus » Thu Jan 03, 2013 2:09 pm

Hi abanowBUSTfGf,

aha! :D

As I wrote earlier, imported sounds CANNOT be played on the mobile platform!
You need to supply the sound as a FILE and play that file.

Do this:
1. in the standalone builder click the "Copy files" button
2. select your sound file "aerosol.au" (and all other sounds if you have more) and "Add" it to your standalone
3. Now you can access that FILE on mobile with:
...
put specialfolderpath("engine") & "/aerosol.au" into tSound
play tSound
...
Hint:
"specialfolderpath("engine") will only work on the mobile platform and will return NOTHING on the desktop!

Please check the "Android Release Notes": Livecode: Menu: "Help" for more infos...


Best

Klaus

P.S.
Please do also make sure that the AU sound file format is supported on ANDROID!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Wav file not playing on android

Post by jacque » Thu Jan 03, 2013 7:56 pm

Audio .au files are not usually supported on Android. Every device seems to support different formats but I don't remember seeing .au much. Almost all Android devices support .wav though, so the original format should work as long as it is saved to a file.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply