窗户蜂鸣()等同于Linux [英] Windows Beep() equivalent for Linux

查看:194
本文介绍了窗户蜂鸣()等同于Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与蜂鸣功能尝试在Windows上:

I am experimenting with Beep function on Windows:

#include <windows.h>
...
Beep(frequency, duration);

计算机然后以一定的频率一些时间发出蜂鸣声。我会怎么做这在Linux计算机上?

The computer then beeps with some frequency for some duration. How would I do this on a Linux computer?

编辑:这是输出不同频率的重要

It IS important to output different frequencies.

推荐答案

查看源$ C ​​$ C与Ubuntu的(也可能是其他发行版)提供蜂鸣或看一看的 http://www.johnath.com/beep/beep.c 另一个源(这是相同的code,I相信)。

Check out the source code for beep available with Ubuntu (and probably other distros) or have a look at http://www.johnath.com/beep/beep.c for another source (it's the same code, I believe).

它可以让你控制频率,轻松长度和重复(除其他事项外)。

It allows you to control frequency, length and repetitions (among other things) with ease.

这篇关于窗户蜂鸣()等同于Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆