Audio recording fails when trying to record video
Tore Nilsen
tore.nilsen at me.com
Tue Apr 3 12:22:54 EDT 2018
I am currently trying to help one of my students with setting up a camera control to record video. We have been able to set up a camera control to record video, but no sound is recorded. According to the dictionary an audioDevice ID should be set in order to record sound as well as video. Using the cameraControlGet to get the audioDevice ID does not return empty, but no sound is recorded. That is, sometimes it do record sound, others it do not.
When trying to explicitly set the audioDeviceID upon creation of the cameraControl, I get a script error, unless I type the audioID inside quotes directly into the code. This is of course annoying and not very useful, as one never knows the audioDeviceID other than on the device used to make the application. I must admit I have no idea as to what I am doing wrong, but I trust this list to spot the obvious mistake quickly. Here is the script for setting up the camera control:
on mouseUp
cameraControlCreate "myFirstCamera"
cameraControlSet "myFirstCamera", "visible", true
cameraControlSet "myFirstCamera", "rect", "0,79,400,304"
put line 1 of cameraControlGet("myFirstCamera","audioDevices")into tAudio
delete last item of tAudio -- the name of the audio input device, an error is thrown at runtime unless this is deleted
cameraControlSet "myFirstCamera", "audioDevice", tAudio
end mouseUp
Best regards
Tore Nilsen
More information about the use-livecode
mailing list