如何在 Livecode 中录制音频?
How to record audio in Livecode?
我正在使用 Livecode Community 7.0.4
并且正在尝试创建音频。
我在windows 10
.
我创建了 three
个按钮 record
、stop
和 play
。
在每个按钮上我都有这些代码:
//record
on mouseUp
record sound test.wav
end mouseUp
//stop
on mouseUp
stop recording
end mouseUp
//play
on mouseUp
play test.wav
end mouseUp
但是这些都不起作用。没有生成音频文件。
正确的做法应该是什么?
对于record
,我也试过这段代码,但结果相同。
on mouseUp
set the dontUseQT to false
record sound test.wav
end mouseUp
首先,您遗漏了关键字 file
。
record sound file "test.wav"
这是更完整的答案。目前,只有在您的系统上安装了适用于 Windows 的 QuickTime 时,才能进行录音。请务必先将录制属性设置为您想要的。正确的语法是:
set the recordFormat to "wave"
set the recordCompression to "raw " # note trailing space
set the recordSampleSize to 16 # bit depth
set the recordRate to 44.1 # sampling rate
set the dontUseQT to false
record sound file "C:/path/to/file/test.wav"
音频录制框架正在完全重写,将在 LC v.9 系列中的某个时间可用。 (第 9 版的初始 alpha 版本现已发布。)这将消除录音对 QuickTime 的依赖。
我正在使用 Livecode Community 7.0.4
并且正在尝试创建音频。
我在windows 10
.
我创建了 three
个按钮 record
、stop
和 play
。
在每个按钮上我都有这些代码:
//record
on mouseUp
record sound test.wav
end mouseUp
//stop
on mouseUp
stop recording
end mouseUp
//play
on mouseUp
play test.wav
end mouseUp
但是这些都不起作用。没有生成音频文件。
正确的做法应该是什么?
对于record
,我也试过这段代码,但结果相同。
on mouseUp
set the dontUseQT to false
record sound test.wav
end mouseUp
首先,您遗漏了关键字 file
。
record sound file "test.wav"
这是更完整的答案。目前,只有在您的系统上安装了适用于 Windows 的 QuickTime 时,才能进行录音。请务必先将录制属性设置为您想要的。正确的语法是:
set the recordFormat to "wave"
set the recordCompression to "raw " # note trailing space
set the recordSampleSize to 16 # bit depth
set the recordRate to 44.1 # sampling rate
set the dontUseQT to false
record sound file "C:/path/to/file/test.wav"
音频录制框架正在完全重写,将在 LC v.9 系列中的某个时间可用。 (第 9 版的初始 alpha 版本现已发布。)这将消除录音对 QuickTime 的依赖。