c语言中有声音导入的函数吗?

来源:百度知道 编辑:UC知道 时间:2024/06/17 18:56:05

函数名: sound
功 能: 以指定频率打开PC扬声器
用 法: void sound(unsigned frequency);
程序例:

/* Emits a 7-Hz tone for 10 seconds.
Your PC may not be able to emit a 7-Hz tone. */
#include <dos.h>

int main(void)
{
sound(7);
delay(10000);
nosound();
return 0;
}