2016-06-29 56 views
2

我正在嘗試錄製我正在創建的實驗的音頻文件。這裏是我使用的代碼:Livecode錯誤-231開始錄製

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 

爲了弄清楚爲什麼它不工作,我得到這個錯誤:

error -231 starting recording

這個問題一直沒有解決的LiveCode論壇,所以我想我會在這裏嘗試。

注: 的QuickTime 7.7.7/Livecode版本7.01/10的Windows

回答

1

音頻記錄功能使用的QuickTime。從LiveCode 6.7開始,默認情況下不會加載QuickTime。你必須告訴LC使用QT。嘗試在record sound file命令之前的某處添加此行:

set the dontUseQT to false 
+0

不幸的是,這並未解決問題。我仍然收到錯誤。謝謝你的努力! – starfirescully