这是调用wav文件的代码,还有需要改进的地方吗?
procedure TForm1.BitBtn1Click(Sender: TObject);
var
i,j,n:integer;
YY,DXJinE:string;
const
WaveList:array [1..18] of string=('壹','贰','叁','肆','伍','陆','柒','捌','玖','整','拾','佰','仟','万','亿','圆','角','分');
begin
DXJinE:='壹贰叁肆伍陆柒捌玖';
for i:=1 to length(DXJinE) div 2do
begin
YY:=copy(DXJinE,2*i-1,2);
for j := 1 to 18do
if WaveList[j] = YY then
begin
n := j;
break;
end;
sndplaysound(PChar(WaveList[n]+'.wav'),SND_ASYNC);
sleep(350);
end;
end;