Sound files.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Sound files.
Anybody been able to add soundfiles successfully and runing in the simulator with 4.5.2?
It halts for me with an "unknown error" message.
Cheers,
Malte
It halts for me with an "unknown error" message.
Cheers,
Malte
Re: Sound files.
my workaround for now is to suck up the files in custom properties and spit them out to specialfolderpath("engine"). Not very elegant and requires twice the memory. I´d still appreciate any pointers.
Re: Sound files.
Hi Malte,
works on my simulator!
I added just one file (mp3 or aif, both work, probably any QT compatible format) to the iOS deplyment and used this script:
...
put the effective filename of this stack into tFilename
set itemdel to "/"
put "testsound.mp3" into item -1 of tFilename
play tFilename
...
I first tried without the path, since I thought that would be the "defaultfolder" but that did not work.
Supplying the absolute path works for me, at least in the simulator.
Best
Klaus
works on my simulator!
I added just one file (mp3 or aif, both work, probably any QT compatible format) to the iOS deplyment and used this script:
...
put the effective filename of this stack into tFilename
set itemdel to "/"
put "testsound.mp3" into item -1 of tFilename
play tFilename
...
I first tried without the path, since I thought that would be the "defaultfolder" but that did not work.
Supplying the absolute path works for me, at least in the simulator.
Best
Klaus
Re: Sound files.
I just discovered this extremely important info in a small sentence in the iOS release notes:
Note: Unlike (most) Mac OS X installs, the iPhoneOS filesystem is case-sensitive so take care
to ensure that you consistently use the same casing for filenames when constructing them.
Back to my project and change everything to fit into this new restriction!
Best
Klaus
Note: Unlike (most) Mac OS X installs, the iPhoneOS filesystem is case-sensitive so take care
to ensure that you consistently use the same casing for filenames when constructing them.
Back to my project and change everything to fit into this new restriction!
Best
Klaus
Re: Sound files.
I have also been Having trouble getting sounds to play on iPad. I have been adding sound files as controls within live code. Will these file not work on simulator or iOS device?
Re: Sound files.
I have the files playing just fine, once I am able to get them into the simulator. Strangely though files do not get copied over once I add a file (in a subfolder besides my main stack) the simulation does not start with "unknown error" in the first place. If I put the files into cProps first and then spit them out in the simulator, they play just fine. Strange...
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Sound files.
I am also not able to get sounds to play in the simulator nor on a real device using the integrated iOS/4.5.2.
I've added the sounds using Import as Controls... I've double-check the case.... the sounds play in the IDE and on a Mac standalone using the format
play "mySoundfile.wav"
When using the pre-alpha plugin, sounds were loaded via the plugin and played using this format
play specialFolderPath("engine") &"/"& "mySoundfile.wav"
Sounds on my apps created with the plugin play just fine in the simulator and on real devices.
take care,
randy
I've added the sounds using Import as Controls... I've double-check the case.... the sounds play in the IDE and on a Mac standalone using the format
play "mySoundfile.wav"
When using the pre-alpha plugin, sounds were loaded via the plugin and played using this format
play specialFolderPath("engine") &"/"& "mySoundfile.wav"
Sounds on my apps created with the plugin play just fine in the simulator and on real devices.
take care,
randy
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Sound files.
Hi Malte, Randy,
with a certain version I am not alowed to mention this works for me in the Simulator and on the iPhone:
adding the file "inhale.aif" with the Standalone Application Setting-> Copy files. This puts the file into the specialfoderPath("engine").
at least for video you have to watch out: video formats that play in the Simulator don't always work on the actual device. It depends on the encoding. This is probably also true for sounds.
Kind regards
Bernd
EDIT: I compiled the stack with Livecode 4.5.2 and above script / stack worked also.
with a certain version I am not alowed to mention this works for me in the Simulator and on the iPhone:
Code: Select all
on mouseUp
put "inhale.aif" into tSound
put specialfolderpath("engine") & "/" into tMypath
put tSound after tMyPath
play tMyPath
end mouseUp
at least for video you have to watch out: video formats that play in the Simulator don't always work on the actual device. It depends on the encoding. This is probably also true for sounds.
Kind regards
Bernd
EDIT: I compiled the stack with Livecode 4.5.2 and above script / stack worked also.
Re: Sound files.
I found the cause of my issue at least.
The files are not copied with an unknown error dialogue popping up, as soon as they are in a folder relative to the source stack. If the file is not in a folder it gets copied just fine.
Will report this.
Thanks,
Malte
The files are not copied with an unknown error dialogue popping up, as soon as they are in a folder relative to the source stack. If the file is not in a folder it gets copied just fine.
Will report this.
Thanks,
Malte
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Sound files.
Just tried 4.5.2 iOs and created a test app. Sounds play on simulator, iPod touch and iPhone, but not iPad! The files were added using the 'Standalone application settings'. Anyone have any tips?
JC
JC
-
- Posts: 65
- Joined: Thu Oct 07, 2010 4:47 pm
Re: Sound files.
From my knowledge the only sound file format that will play within an iPhone or iPad app is the CAF file format.
http://en.wikipedia.org/wiki/Core_Audio_Format
http://en.wikipedia.org/wiki/Core_Audio_Format