FMicrophone := TCaptureDeviceManager.Current.DefaultAudioCaptureDevice;
if Assigned(FMicrophone) then
begin
FMicrophone.FileName := udpclients.tempsavepath + ‘\RecordTest.wav‘;
try
FMicrophone.StartCapture;
except
ShowMessage(‘设备不识别或不支持。‘);
end;
end
else
ShowMessage(‘没有可用的麦克风。‘);
if Assigned(FMicrophone) then try
if FMicrophone.State = TCaptureDeviceState.Capturing then
begin FMicrophone.StopCapture;
end; except
ShowMessage(‘设备不识别或不支持‘); end;
FMX.MEDIA中的录音功能实现,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/HuiLove/p/3909974.html