Play audio control in iOS?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Play audio control in iOS?

Post by thatkeith » Wed Dec 15, 2010 4:19 pm

Hi,
I've imported a short audio file (AIFF) as a control. On the Mac, when I play this either by name or audioClip number reference, it plays fine. When I test this in the simulator or on my iPhone the audio doesn't play. I'm probably missing something simple - could someone give me a nudge in the right direction? (If this is an audio format thing, what are the safe formats?)

play "static-8.aiff" looping
play audioClip 2

Keith
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4002
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Play audio control in iOS?

Post by bn » Wed Dec 15, 2010 5:19 pm

Hi Keith,

convert the aiff file to m4v or 3GP format. That should work. Although I got aiff to work on the iPhone, apparently not all aiff format variations are supported.
Quicktime Player 10 lets you do a save as to the proper format. Quicktime Player 7.x.x lets you export to these formats. You probably need a Pro license for that in the Player 7.x.x.

Kind regards

Bernd

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Play audio control in iOS?

Post by Klaus » Wed Dec 15, 2010 7:21 pm

Hi Keith,

you can also use my freeware "The Exporter" (get it here: http://www.major-k.de/download.html).
This gives you the export capabilities of the PRO version of the QT 7 player for free.

AND this nice little app is of course made with Livecode! 8)


Best

Klaus

P.S.
Is playing internal sound really an official iOS feature?
The release notes only speaks of external files!

Randy Hengst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 153
Joined: Thu Jun 29, 2006 4:16 pm

Re: Play audio control in iOS?

Post by Randy Hengst » Wed Dec 15, 2010 7:59 pm

Hi Keith,

I also had problems getting sound to play... I haven't been able to get audio to play in the iOS using the play mySoundFile.wav format.... I added the sounds using Import as Control.... that works fine in the IDE and in a Mac standalone.

To get sounds to play in the iOS Simulator and on a real device I added the sounds using the Copy Files tab in the Standalone Application Settings... after adding the files that way use this formate in to play the sounds....

play specialFolderPath("engine") &"/"& "mySoundFile.wav"


take care,
randy hengst

Post Reply

Return to “iOS Deployment”