I suspect this is a common issue addressed in the forums and Livecode documentation, but after quite a bit of searching I haven't come across a promising direction, so I'm starting this thread. Apologies if the answer is simple and I should have found it on my own!
I develop in Mac. My app implements brief audio files sounded through two player objects. Everything works fine in Livecode. There is a folder with the audio files and another with some simple graphics files, both of which I include in the Standalone Applications Settings dialogue. In the Mac standalone all the graphics work fine; they are accessed correctly, suggesting that file location is not the problem. But no audio sounds. Show Package Contents from the finder shows both folders where they should be.
Most of the audio files are mp3, but some I have not yet converted from aiff. Neither sound. Does that suggest that audio format is not the problem?
I am using defaultFolder, not specialFolderPath. Again, the graphics work great, suggesting to this rookie that that is not the problem. Or am I wrong?
Thanks in advance for any assistance!
-Bruce
Audio not sounding in standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Audio not sounding in standalone
Hi Bruce,
this is surely a pathname problem!
if you add your files (graphis, audio, video etc.) to your standalone via the "Copy files" tab in the "Standalone Application Settings",
then you will find them here in the runtime, no need to set the defaultfolder -> specialfolderpath("resources")
This will work in the IDE and in the standalone if you have a folder named "audio" in the folder with your stack (IDE)
or in the runtime if you added that folder as described above:
Best
Klaus
this is surely a pathname problem!
if you add your files (graphis, audio, video etc.) to your standalone via the "Copy files" tab in the "Standalone Application Settings",
then you will find them here in the runtime, no need to set the defaultfolder -> specialfolderpath("resources")
This will work in the IDE and in the standalone if you have a folder named "audio" in the folder with your stack (IDE)
or in the runtime if you added that folder as described above:
Code: Select all
...
put specialfolderpath("resources") & "/audiuo/a sound.mp3" into tFile
set the filename of player 1 to tFile
start player 1
...
Klaus
Re: Audio not sounding in standalone
Thanks, Klaus. You rock!
I had considered doing as you suggested but was faked out by the fact that the graphics worked while the audio didn't. Lesson learned.
I had considered doing as you suggested but was faked out by the fact that the graphics worked while the audio didn't. Lesson learned.