Playing wav sound file in Linux in background?

John Patten johnpatten at mac.com
Wed May 19 23:31:00 EDT 2010


Thanks Everyone...

... and Andre all try out you suggestion on the shell command when I get a second. I solved the issue by just looking a little closer and the man file for arecord and discoverd that I could just change the file format to one that Revolution could handle. It used "-f u8" and that did the trick.

I have one other question about getting the correct path to a directory in a standalone where I save my stack saves the audio file. It works fine when I'm in Revolution editor, but after I save it as a standalone it saves the audio file in the wrong location.  I was under the impression that Windows and Linux did not have an issue with file paths when saved as standalones, but I may be doing something incorrectly.

Here's what i have:

put the effective filename of current stack into theTargetPath
set the itemDel to "/"
delete last item of theTargetPath
delete first item of theTargetPath
put "/" & theTargetPath & "/recordings/" into theRecordingTarget

convert the date && the long time to seconds
put it into tFileNameRec
put tFileNameRec into cd fld "audioFileName"

send "mouseUp" to btn "Stop Recording" in 10 secs
put "arecord -d 10 -fu8 -t wav" into tShellCmd
put shell(tschellCmd&&theRecordingTarget&FilenameRec)

This works fine when I'm in the editor (saves to the "recordings" folder), but when I create a standalone the standalone saves the audio file as "student" in the location of the directory that I select to build the standalone. 

Any advice on what I'm missing with this little Linux process?

Thank you!

John Patten





More information about the use-livecode mailing list