动态代码错误-231开始录制

时间:2016-06-29 19:01:52

标签: audio audio-recording livecode

我正在尝试为我正在创建的实验录制音频文件。这是我正在使用的代码:

global gSubjectID
global recordcount
on mouseUp
set the recordFormat to "wave"  -- or "wave" or "ulaw" 
set the recordCompression to "raw "
set the itemDelimiter to "/"
get the effective fileName of this stack
set the defaultFolder to item 1 to -2 of it
if not (the hilite of me) then

  if recordcount is 1 then
     put gSubjectID & space & "Question 1.wav" into fld "recordFileName"
     put fld "recordFileName" into sndName

     # make sure there's a name
     if sndName is empty then 
        exit mouseUp
     end if

     set the hilite of me to true
     record sound file sndName
     add 1 to recordcount
  end if
  end if 
end mouseUp

一切似乎都有效,当我用另一个按钮停止录制时麦克风打开然后关闭。

我添加了代码

put the result

为了弄清楚它为什么不起作用,我收到了这个错误:

  

错误-231开始录制

这个问题在LiveCode论坛上尚未解决,所以我想我会在这里试试。

注意: Quicktime 7.7.7 / Livecode版本7.01 / Windows 10

1 个答案:

答案 0 :(得分:1)

录音功能使用QuickTime。从LiveCode 6.7开始,默认情况下不加载QuickTime。你必须告诉LC使用QT。尝试在record sound file命令之前的某处添加此行:

set the dontUseQT to false