好久没来这里,想起个问题好像没答案:
想让电脑发出820HZ的声音,或者说指定频率的声音,应该怎么做?
以前用汇编变成,只要通过计时器按1/800秒的频率触动一个声音地址就可以,不知道在VB里用什么方法?
[解决办法]
调用TC或BC的函数?
sound, nosound <DOS.H>
sound turns the PC speaker on at the specified frequency
nosound turns the PC speaker off
Declaration:
void sound(unsigned frequency);
void nosound(void);
Remarks:
sound turns on the PC's speaker at a given frequency.
nosound turns the speaker off after it has been turned on by a call to sound.
frequency specifies the frequency of the sound in hertz (cycles per second).
Return Value: None
[解决办法]
直接用BEEP函数啊.
第一个参数是频率,第二个参数是响多久.
[解决办法]
在VB里可以用shell直接调用你以前用汇编写的那个程序.
只要一句代码就成.
[解决办法]