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 »

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 »

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 »

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 »

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 »

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