mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.1

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.1

Post by gjtaylor99 » Thu Apr 17, 2014 11:38 am

I'm having a release-blocking problem with mobilePlaySoundOnChannel on iPhone 5S in iOS 7.1. Audio doesn't play. Here's the kind of code I'm using:

Code: Select all

on mouseUp
    put (specialFolderPath("engine") & "/sounds/whistle_02.au") into tPath
    put "whistle_02" into tChannelName
    put "now" into tType
    mobilePlaySoundOnChannel tPath, tChannelName, tType
end mouseUp
The app loads onto the iPhone 5S (iOS 7.1) and functions OK in other respects as far as I can tell but won't play audio.

Audio plays fine on:
- iOS Simulator (non-64-bit devices) in iOS 6.1 and iOS 7.1
- iOS Simulator (64-bit devices) in iOS 7.0.3
- iPad 2 in iOS 6.1
- iPhone 4 in iOS 6.1
- iPad mini (v1) in iOS 7.1

I'm running:
- LiveCode Community Edition 6.6.1 Build 4005
- xCode 5.1.1

In LiveCode:
Available device SDKs: 5.1, 6.0, 6.1, 7.1
Available simulators: 5.0, 5.1, 5.0, 6.1, 7.0, 7.1

Can't find a thread on this in the forum.

Anyone
- have any suggestions or a fix?
- know if it's a known issue?
- could it be a 64-bit hardware issue?

Many thanks if you have any ideas.
Last edited by gjtaylor99 on Thu Apr 17, 2014 2:33 pm, edited 2 times in total.
Geoff Taylor
Image

gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by gjtaylor99 » Thu Apr 17, 2014 12:19 pm

Investigating further, I find, in the iOS Simulator, if I set the Applications Settings build not to iOS 7.1 but to iOS 7.0.3, then the app loads correctly in 64-bit mode, and plays audio!

However, building the app in 7.1, 7.0.3, or 6.1 and loading it onto my iPhone 5S (iOS 7.1), I can't get the audio to play.

Hmn...
Geoff Taylor
Image

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by dave.kilroy » Thu Apr 17, 2014 1:03 pm

Hi Geoff

When you wrote "Xcode 5.5.1" I'm assuming you meant "Xcode 5.1.1" - that is a pretty recent update from Apple and I'm wondering if RunRev is fully compatible with it - maybe worth asking them to confirm this?

I'm currently on Xcode 5.1 and have been holding back from upgrading for a bit so if you could you let us know here what they said what would be peachy!

Dave
"...this is not the code you are looking for..."

gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by gjtaylor99 » Thu Apr 17, 2014 1:39 pm

Hi Dave
dave.kilroy wrote:When you wrote "Xcode 5.5.1" I'm assuming you meant "Xcode 5.1.1"
Yes, sorry, Xcode 5.1.1.
that is a pretty recent update from Apple and I'm wondering if RunRev is fully compatible with it - maybe worth asking them to confirm this? I'm currently on Xcode 5.1 and have been holding back from upgrading for a bit...
Yes, thanks for the suggestion, I guess I just upgraded automatically. Didn't really consider the compatibility angle...
so if you could you let us know here what they said what would be peachy!
I've submitted this to RunRev LiveCode Quality Control Center as a bug report.

Thanks!
Geoff Taylor
Image

gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by gjtaylor99 » Sat May 17, 2014 9:09 am

Hi Dave
dave.kilroy wrote:...could you let us know here what they said what would be peachy!
Sorry for the delay. It was a bug and it has been fixed. They asked me to test LiveCode 6.7 DP2 or 7.0 DP2. I tested 6.7.0 DP2 and it was sorted. I'm not running 6.7.0 DP3 and it is fine.

More information:
LiveCode Quality Control Center - Bug 12231
http://quality.runrev.com/show_bug.cgi?id=12231
Bug 12231 - mobilePlaySoundOnChannel not playing audio on iPhone 5S in iOS 7.1 whether Application Settings build is 6.1, 7.0.3 or 7.1
Version: 6.6.1 DP 1
Status: RESOLVED FIXED
Geoff Taylor
Image

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by dave.kilroy » Sat May 17, 2014 1:07 pm

Hi Geoff, thanks for the message glad it's working for you.

I don't have a current iOS development project and haven't built for it for about a month - and in the end I got fed up with the App Store nagging and upgraded to 5.1.1 Xcode anyway...

Dave
"...this is not the code you are looking for..."

gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by gjtaylor99 » Sat May 17, 2014 1:44 pm

Hi Dave
dave.kilroy wrote:glad it's working for you.
Having relayed the good news, only half an hour later I find the issue seems to have re-appeared. Ah well, one step forward.... ;-)
Geoff Taylor
Image

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by dave.kilroy » Sat May 17, 2014 2:42 pm

Oh bu**er - I know the feeling, and apparently there is no workaround until LC is updated - maybe time to put the computer away and enjoy the sun?

Kind regards

Dave
"...this is not the code you are looking for..."

gjtaylor99
Posts: 75
Joined: Mon May 09, 2011 3:01 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by gjtaylor99 » Sun Jun 01, 2014 10:21 am

gjtaylor99 wrote: LiveCode Quality Control Center - Bug 12231
http://quality.runrev.com/show_bug.cgi?id=12231
Bug 12231 - mobilePlaySoundOnChannel not playing audio on iPhone 5S in iOS 7.1 whether Application Settings build is 6.1, 7.0.3 or 7.1
Updated status: RESOLVED NOT_A_BUG

Turned out not to be a bug but user idiocy: I didn't hear the sound because on my test iPhone 5S (and presumably my daughter's 5C) the iPhone's hardware Ringer / Mute switch was set to Mute.

I didn't realise this was an issue - didn't even think to look at the Mute switch - because the Music player and my Podcast app both play through the iPhone's speakers even when it is switched to Mute, and with headphones in, games and other apps play through the headphones whether or not the iPhone is set to Mute. It is only when the iPhone tries to play through its own speakers, when set to Mute, that my app's audio doesn't play.

:oops:

More info here:
LiveCode Quality Control Center - Bug 12231
http://quality.runrev.com/show_bug.cgi?id=12231
Geoff Taylor
Image

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

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by jacque » Sun Jun 01, 2014 7:49 pm

gjtaylor99 wrote:Turned out not to be a bug but user idiocy: I didn't hear the sound because on my test iPhone 5S (and presumably my daughter's 5C) the iPhone's hardware Ringer / Mute switch was set to Mute.
LOL. But sorry, you don't get the prize. I've done way dumber things than that and if I were brave enough to confess them I'd win the blue ribbon.

At one RevLive conference we briefly discussed having an informal topic about "the dumbest programming mistake I ever made." It fizzled out. Everyone wanted to hear the stories but no one wanted to talk about their own. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by dave.kilroy » Sun Jun 01, 2014 9:47 pm

Oh I dunno I might win that blue ribbon - 99% of the time I find the problem is located between the computer screen and the chair :)
"...this is not the code you are looking for..."

masood11
Posts: 1
Joined: Thu Aug 21, 2014 12:07 pm

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by masood11 » Thu Aug 21, 2014 12:10 pm

having same problem when i update to ios 7.. No sound and distorted sound from speaker of my iphone 5s :cry:

nicolascro
Posts: 7
Joined: Tue Apr 17, 2012 6:21 pm

Re: mobilePlaySoundOnChannel not working on iPhone 5S iOS 7.

Post by nicolascro » Fri Mar 20, 2015 2:35 pm

Hi Geoff, I've had the same issue and your post (regarding the mute switch) saved me :idea: :idea: . I didn't think about the mute switch either.
Many thanks!!

However, in my app, while most of the time mobilePlaySoundOnChannel didn't work( when switched to mute), it did work sometimes for no apparent reason, always on the same "spots" in the app but not necessarily with the same sound files. Weirdly enough in these cases, when it worked, pausing and resuming (or playing another sound on another channel) made it become silent again, until you stepped out of the card and came back.
After hours of testing, I still fail to understand why it works in some places and not in other, with the same files on the same channel....

Thanks god, with the mute switch off it works everywhere. So I suppose I can do with that.

I'd say it is not at all user idiocy, but simply a bug, it should work even when switched to mute.

Regards

Post Reply