Вверх ↑
Ответов: 2125
Рейтинг: 159
#1: 2008-04-02 18:25:49 ЛС | профиль | цитата
Вот тупо переделанный:

#pas
Add(MainForm,13485364,21,105)
{
Left=20
Top=105
Width=241
Height=204
Caption="WAVE RECORDER"
}
Add(Button,656033,105,91)
{
Left=60
Top=25
Caption="Record"
link(onClick,10378653:Command1,[])
}
Add(Button,3432630,105,133)
{
Left=60
Top=65
Caption="Stop"
link(onClick,10378653:Command2,[(158,139)(158,104)])
}
Add(Button,12574182,105,175)
{
Left=60
Top=105
Caption="Play"
link(onClick,10378653:Command3,[(170,181)(170,111)])
}
Add(InlineCode,10378653,196,91)
{
WorkPoints=#8:Command1|8:Command2|8:Command3|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|30:uses kol,Share,Debug,mmsystem;|0:|4:type|28: THiAsmClass = class(TDebug)|9: public|48: procedure Command1(var dt:TData; index:word);|48: procedure Command2(var dt:TData; index:word);|48: procedure Command3(var dt:TData; index:word);|32: destructor Destroy; override;|5: end;|0:|14:implementation|0:|31:procedure THiAsmClass.Command1;|5:begin|68: mciSendString('open new Type waveaudio Alias capture', nil, 0, 0);|59: mciSendString('set capture bitspersample 16', nil, 0, 0);|61: mciSendString('set capture samplespersec 8000', nil, 0, 0);|53: mciSendString('set capture channels 1', nil, 0, 0);|45: mciSendString('record capture', nil, 0, 0);|4:end;|0:|31:procedure THiAsmClass.Command2;|5:begin|43: mciSendString('stop capture', nil, 0, 0);|58: mciSendString('save capture c:\NewWave.wav', nil, 0, 0);|4:end;|0:|31:procedure THiAsmClass.Command3;|5:begin|50: mciSendString('play capture from 0', nil, 0, 0);|4:end;|0:|31:destructor THiAsmClass.Destroy;|5:begin|44: mciSendString('close capture', nil, 0, 0);|4:end;|0:|4:end.|
}
карма: 1

0