Play an audio clip in Android with LC? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Play an audio clip in Android with LC? - Solved
I read a few posts and look around at the limited documentation on LC audio
and it sounds like this might be a weak area for LC.
So I have a game that I play an audio clip on certain events and
want to know the Best way to play an audio clip in LC (in an Android environment)?
Thanks,
David
and it sounds like this might be a weak area for LC.
So I have a game that I play an audio clip on certain events and
want to know the Best way to play an audio clip in LC (in an Android environment)?
Thanks,
David
Last edited by DR White on Fri Sep 20, 2013 10:03 pm, edited 2 times in total.
Re: What is the Best way to play an audio clip in LC?
Hi David,
on Android you do not have that many choices for this
...
play path_to_soundFile
...
Make sure to use the correct sound format for Android.
On mobile the "play" command is not limited to the engine
capabilities of Livecode but the supported formats of the target
platform.
Check this:
http://developer.android.com/guide/appe ... rmats.html
Best
Klaus
on Android you do not have that many choices for this

...
play path_to_soundFile
...
Make sure to use the correct sound format for Android.
On mobile the "play" command is not limited to the engine
capabilities of Livecode but the supported formats of the target
platform.
Check this:
http://developer.android.com/guide/appe ... rmats.html
Best
Klaus
Re: What is the Best way to play an audio clip in LC?
Klaus,
I am leaving for work now and will checkout the link latter today.
Would it be possible for you to attach an example stack playing
a sound file, volume control and sound on/off utilizing this method?
Thanks,
David
I am leaving for work now and will checkout the link latter today.
Would it be possible for you to attach an example stack playing
a sound file, volume control and sound on/off utilizing this method?
Thanks,
David
Re: What is the Best way to play an audio clip in LC?
Hi David,
I do not develop for Android, so please refer to the docs for this:
http://livecode.com/developers/guides/m ... -features/
Scroll to -> Basic Sound Playback Support
I saw that "mobilePlaySoundOnChannel" is also supported on Android, this will give you more control over your sounds than the "simple" play.
Best
Klaus
I do not develop for Android, so please refer to the docs for this:
http://livecode.com/developers/guides/m ... -features/
Scroll to -> Basic Sound Playback Support
I saw that "mobilePlaySoundOnChannel" is also supported on Android, this will give you more control over your sounds than the "simple" play.
Best
Klaus
Re: What is the Best way to play an audio clip in LC?
Klaus,
Thanks for the reference links,
David
Thanks for the reference links,
David
Re: What is the Best way to play an audio clip in LC?
So far, I have had no success playing a sound clip in Android with LC.
Some sample code would be very much appreciated.
Thanks,
David
Some sample code would be very much appreciated.
Thanks,
David
Re: Play an audio clip in Android with LC? - Solved
Problem Solved!
Please see the post of:
jacque » Fri Sep 20, 2013 12:19 pm
Under "Android Development", the topic :
How to use "mobilePlaySoundOnChannel"

Please see the post of:
jacque » Fri Sep 20, 2013 12:19 pm
Under "Android Development", the topic :
How to use "mobilePlaySoundOnChannel"
Re: Play an audio clip in Android with LC? - Solved
And it's even in the dictionary with examples! 

Re: Play an audio clip in Android with LC? - Solved
Klaus,
I tried the exact examples in the dictionary for both "Play" and "mobilePlaySoundOnChannel", plus several variations.
I could not get either to work as they appeared in the dictionary, in an android environment.
I believe without the word "engine" as part of the path that Jacque brought to light, the odds of working were slim.
As always Klaus, Thanks for your help,
David
I tried the exact examples in the dictionary for both "Play" and "mobilePlaySoundOnChannel", plus several variations.
I could not get either to work as they appeared in the dictionary, in an android environment.
I believe without the word "engine" as part of the path that Jacque brought to light, the odds of working were slim.
As always Klaus, Thanks for your help,
David