Audio not sounding in standalone

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Audio not sounding in standalone

Post by bd525 » Mon Aug 17, 2020 12:06 am

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

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Audio not sounding in standalone

Post by Klaus » Mon Aug 17, 2020 1:23 pm

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:

Code: Select all

...
put specialfolderpath("resources") & "/audiuo/a sound.mp3" into tFile
set the filename of player 1 to tFile
start player 1
...
Best

Klaus

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Audio not sounding in standalone

Post by bd525 » Mon Aug 17, 2020 2:44 pm

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.

Post Reply