Playing sounds on iPad/Iphone

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jizzle
Posts: 10
Joined: Fri Mar 16, 2012 4:31 pm

Playing sounds on iPad/Iphone

Post by jizzle » Mon Jun 18, 2012 12:42 pm

Hi guys,
I'm having real difficulty getting my app sound to work on an iPad. I have tried 2 of the tutorials on the subject and have still seen no luck. I know you have to copy files to the standalone settings and reference them but there is still no sound coming out from my iPad when testing and also if I press play in live code it works fine.
Surely it shouldn't be so hard to play sounds? Can anyone please help...

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Playing sounds on iPad/Iphone

Post by Dixie » Mon Jun 18, 2012 1:01 pm

Jizzle...

Would you post your script...

be well

Dixie

jizzle
Posts: 10
Joined: Fri Mar 16, 2012 4:31 pm

Re: Playing sounds on iPad/Iphone

Post by jizzle » Mon Jun 18, 2012 1:09 pm

This is the one that is working on both Livecode and the simulator but not on actual IPad:


on mouseUp

set the folder to the engine folder
play "/Users/kingjamesii/Documents/Graphic Design/Alcohol App/VoiceOver/background.aif"

end mouseUp

and this is another effort:

on mouseUp
play specialFolderPath("engine")& "/Users/kingjamesii/Documents/Graphic Design/Alcohol App/VoiceOver/background.aif"
end mouseUp

thanks

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Playing sounds on iPad/Iphone

Post by Dixie » Mon Jun 18, 2012 1:44 pm

Jizzle..

This works on a mobile device.. note that through the 'copy files' pane, I have copied a folder 'musicTracks' that contains the audio file 'aa.aiff"

Code: Select all

on mouseUp
   put specialFolderPath("engine") & "/musicTracks/aa.aiff" into theFileToPlay
   play theFileToPlay
end mouseUp
be well

Dixie

jizzle
Posts: 10
Joined: Fri Mar 16, 2012 4:31 pm

Re: Playing sounds on iPad/Iphone

Post by jizzle » Mon Jun 18, 2012 2:29 pm

Thank You so much! you've saved the day for me :D

Post Reply