LiveCode 6.5.2 - Play Sound.

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

LiveCode 6.5.2 - Play Sound.

Post by Googie85 » Wed Jan 27, 2016 5:13 am

Hello Guys!

I am writing a small game in LC 6.5.2 so that I get faster image animations rather than LC 7 or 8. I am tring to play a sound file
but the "Play "filename" isnt supported on the LC release I am using.

I came accross the mobileControlCreate "player" control that I am having trouble in getting it to work. My code is:

Code: Select all

on openCard
   put specialFolderPath("engine") & slash & "5.ogg" into soundgoal
   
mobileControlCreate "player", "sound"
put the result into sPlayerID
mobileControlSet sPlayerID, "filename", soundgoal
         end openCard
Am I doing this wrong? There is also the following, I havnt tried yet:

Code: Select all

mobilePlaySoundOnChannel sound, channel, type 
Any help would be really appreciated!

Many Thanks,

Matthew.

EDIT:

I have tried this but to no avail:

Code: Select all


   put specialFolderPath("engine") & slash & "5.ogg" into soundgoal
   
mobileControlCreate "player", "sound"
mobileControlSet "sound", "filename", soundgoal
mobileControlDo "sound", "play"


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

Re: LiveCode 6.5.2 - Play Sound.

Post by jacque » Wed Jan 27, 2016 5:51 pm

The most likely reason is that the path is wrong. After the line where you build it, insert a temporary line for testing:

answer there is a file soundgoal

That should tell you what the engine sees.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply