Hi Dan,

I haven't used cameracontrol, but... In a Mac-only app I built for a client, I used the 'sox' commandline app for recording. It has been quite reliable now for several years.

Like so:


command audio_startRecording*
*    put <sox filepath> into sRecorderApp
    put <output filepath> into sFilename

    put sRecorderApp \
      && "-q -d -r 22050 -b 16 -e signed -c 1" \
      && sFilename \
      into sCommand -- settings are for recording speech

    open process sCommand for neither
end audio_startRecording


command audio_stopRecording
    -- get the sox process ID
    filter shell("ps -A") with ("*" & sRecorderApp & "*") into tList
    put word 1 of tList into tPID

    -- end the sox process
    put shell("kill -s INT" && tPID) into sCommandStatus
    # Tells 'kill' to send SIGINT to the recorder app - equivalent to control-c in Terminal

    -- close the LC process
    put empty into tResult
    try
        close process sCommand
        put the result into tResult
    catch tErr
        put tErr into tResult
    end try

    -- return the filename
    return sFilename
end audio_stopRecording


I imagine there are other commandline apps that would work as well.

Hope this helps -
Phil Davis



On 9/20/19 2:27 PM, Dan Soneson via use-livecode wrote:
I am trying to update audio recording capabilities in LiveCode, now that we
soon won't be able to use QuickTime any longer, even on Macs. I've been
trying to use cameracontrol to do the recording, but have quickly run into
2 major bugs, I think - one an absolute showstopper:

I set the videoDevice to empty, so as to only record the audio. It seems I
am able to record audio only for 10 seconds or less. Once I go beyond 10
seconds the resulting file is unreadable, and simply doesn't play in the
player. Can anyone get a successful, playable audio recording longer than
10 seconds?

When I enable the video recording as well, I get a lovely video recording
with audio if the recording is 10 seconds or shorter. Once the video is
longer than 10 seconds, there is no audio at all but the video is still
lovely. So the file plays, but there is no audio.

Am I alone in experiencing these problems? Is there another way to do audio
recording, since we can no longer do "record sound" (since it is not
available for Windows, and is restricted to 32 bit applications on Mac)?

Platform: MacOS Mojave
LiveCode Business 9.04

Thanks,
Dan
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis
503-307-4363

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to