Sound Works with IOS but not Android? - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Sound Works with IOS but not Android? - Solved

Post by DR White » Thu Aug 17, 2017 6:21 pm

I have a button with the following simple script:

global tTouchSound, MobileFlag

on mouseDown

if MobileFlag =1 then
mobilePlaySoundOnChannel tTouchSound, "current", "now"
end if

end mouseDown

It works fine on my IOS device, but not on my Android.

The dictionary says it should work with both platforms.

Anybody have some ideas, what could be causing this mystery?

Thanks,

David
Last edited by DR White on Sat Aug 19, 2017 12:00 pm, edited 1 time in total.

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

Re: Sound Works with IOS but not Android?

Post by jacque » Fri Aug 18, 2017 9:16 pm

What format is the sound saved in? Check whether Android supports that format.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Sound Works with IOS but not Android?

Post by DR White » Sat Aug 19, 2017 12:42 am

Jacque,

I am using mp3 format.

I have tested the android device and it plays mp3 files.

With the volume all the way up, I can hear very faint sound when I do a "mouseup".

I tested my Galaxy Note 10.1 again and it plays mp3 files fine.

I tested my app again, this time with my ear next to the Note 10.1 and I could hear a very faint sound when
I did MouseUp.

It is definitely planning the mp3 sound files, but almost impossible to hear.

You have helped me find something, but I don't know what?

Thanks again for your help,

David

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Sound Works with IOS but not Android?

Post by DR White » Sat Aug 19, 2017 1:17 am

I added :

mobileSetSoundChannelVolume "current", 100

to the script, but no change and still the sound is barely audible.

Thanks,

David

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

Re: Sound Works with IOS but not Android?

Post by jacque » Sat Aug 19, 2017 3:32 am

Okay, good, that's progress. So it does play, the problem is volume. Forgive me but I don't know how familiar you are with Android -- is the media volume turned up? That's different from the system volume.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Sound Works with IOS but not Android?

Post by DR White » Sat Aug 19, 2017 11:59 am

Jacque,

1st of all, when I am troubleshooting anything, there are no dumb questions.
2nd of all, I appreciate all question, as we all make stupid mistakes, whether we admit it or not (a smarter persons admits it).
3rd of all, You have been an awesome resource over the years and many times instrumental getting my projects back on track.

So,
Media volume?

I assumed that when I tested it with playing a mp3 file that my volume settings were good.

Following your advice (as always), I went to settings, sound, volume and saw 3 volume settings, all were set at mid point.

I increased the media setting to 80%

Tried the app and wah lah, the app sound was audible.

Why did mobileSetSoundChannelVolume "current", 100 instruction, not change the media volume?

Jacque, you are Angel, delivering me from torment so many times.

Eternal Thanks for your help,

David

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

Re: Sound Works with IOS but not Android? - Solved

Post by jacque » Sat Aug 19, 2017 5:14 pm

Glad it's fixed, I know how frustrating something like that can be.

I believe the way LC sets the channel volume is as a percentage of the device's media volume. So if the system media is set to 50% and the channel volume is 50% then what you'll really hear is the volume at 25%.

I thought the default for LC playback was 100% though, so you should have heard something. I'm a little puzzled too.

If the sound was created at a low volume you may have to normalize it in a sound editor. If that's not the case then this may be a reportable bug. Did you make the sounds yourself? Can you edit them?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Sound Works with IOS but not Android? - Solved

Post by DR White » Mon Aug 21, 2017 1:05 am

Jacque,

I created them, but I use the same file on both Android and IOS devices.
Biggest difference was probably that the IOS device volume was set at 100% and the Android device volume was set at 50%. The sound file is a soft button "click" type sound and my hearing is not the greatest. I published the app last night.

Thanks for your help,

David

Post Reply