- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有以下代码:
#include <windows.h>
#include <stdio.h>
int main(void)
{
Beep(523, 500);
Sleep(1000);
return 0;
}
我正在使用 MinGW 和 Dev-C++ 编译它。我的问题是我听不到任何声音,尽管我没有收到错误消息。我有 Windows 7。有什么想法吗?
最佳答案
打开扬声器。如果它们已经打开,请调高音量。如果您的计算机上没有安装扬声器和声卡,请获取并安装它们,然后再次尝试运行该程序。
所有这些都需要从 Beep
function 中听到任何信息在 Windows 7 上。It no longer plays sound from the built-in hardware system speaker.相反,声音会传递到用户 session 的默认声音设备。在标准的本地用户 session 中,这就是您的声卡。文档在“备注”部分解释了这一重要细节:
A long time ago, all PC computers shared a common 8254 programable interval timer chip for the generation of primitive sounds. The
Beep
function was written specifically to emit a beep on that piece of hardware.On these older systems, muting and volume controls have no effect on
Beep
; you would still hear the tone. To silence the tone, you used the following commands:net stop beep
sc config beep start= disabledSince then, sound cards have become standard equipment on almost all PC computers. As sound cards became more common, manufacturers began to remove the old timer chip from computers. The chips were also excluded from the design of server computers. The result is that
Beep
did not work on all computers without the chip. This was okay because most developers had moved on to calling theMessageBeep
function that uses whatever is the default sound device instead of the 8254 chip.Eventually because of the lack of hardware to communicate with, support for
Beep
was dropped in Windows Vista and Windows XP 64-Bit Edition.In Windows 7, Beep was rewritten to pass the beep to the default sound device for the session. This is normally the sound card, except when run under Terminal Services, in which case the beep is rendered on the client.
关于c++ - 为什么在 Windows 7 中调用 Beep 功能后听不到任何声音?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10266599/
是否可以使用回调来监听 CSS 变量的变化?像这样的东西: documentElement.addListener('css-var-main-background-color', () => {
我有应该运行laravel队列的docker镜像。在图像中,我有php artisan queue:listen命令,但是当我启动容器时,什么也没有发生,并且容器在运行。 这是基本图片 FROM ph
我正在尝试下载视频以在 exoplayer 中离线播放,但我不知道如何收听 onDownloadComplete。在 exoplayer 文档中,他们说 DownloadService是一个环绕 an
如果我在 View Controller 上有 2 个通知有 2 个这样的观察者,这是否合适: [NSNotificationCenter defaultCenter] addObserver:sel
尝试创建服务器-客户端应用程序时,我在设置服务器端连接时遇到了一些麻烦。设置套接字并bind()ing 套接字后,我的listen() 调用失败并显示错误消息 listen: Invalid argu
我有一个从不同模块更新的 UITextField(我将我的 UITextField 传递给上面提到的模块以填充它)。我需要一种方法来识别 UITextField 的文本值何时在 UITextField
假设我有单独的 Django 和 Tornado 应用程序。这就是我想要实现的目标: Django 收到一些 POST 请求并通知 Tornado 应用程序,以便 Tornado 应用程序可以向其连接
在一个模块上,我需要监听 url 的变化,所以我写了一个简单的代码: componentDidMount(){ history.listen( location => {
我想断言,当单击禁用按钮时,不会触发其 onClick 事件。我如何用 enzyme 来做到这一点?请参阅下面的示例代码。谢谢! sampleButton.jsx: import React from
我遇到了这个问题,我有一个部分(“.aboutsection”)一开始是隐藏的,需要在点击网页上的某个点时显示出来,然后开始为 .slideDown() 设置动画。我让它工作了,但每次我滚动到那个特定
我有一个关于 JS 中的键盘事件的问题。 首先,请不要回答我使用 jQuery 方法,我知道其中的大部分(绑定(bind)/解除绑定(bind),开/关,一个......)但我使用内部框架必须在没有
shiny 中是否有一个暴露的(甚至可能是非暴露的)函数会告诉我什么时候 react 失效?示例草稿: ui.R selectInput('select', ...) 服务器.R myfunc <-
我正在使用 PostgreSQL 数据库并应用它的 LISTEN/NOTIFY 功能。所以我的监听器在我的 AS(应用程序服务器)上,我在我的数据库上配置了触发器,这样当在表上执行 CRUD 操作时,
设置:一个简约的 Linux(华硕路由器上的 OpenWRT),一个 USB 键盘(假设我知道设备名称,如/dev/hiddev0) 一个目标:编写一个 python(或 shell,在这种情况下我可
我使用 Fragment 让用户在我的 Android 应用程序中输入信息。如果输入了信息,我希望在用户按下“后退”键时向用户发送警告。如果他确认要放弃更改,则必须弹出 Fragment。如果他取消放
这是我的 HTML/CSS 当前的样子: 这是我想要它的样子: 我如何修改下面的 HTML/CSS 以使其显示我想要的样子? HTML: CSS: .upda
我想使用 Heroku、PostgreSQL 和 Node.js,并将其设置为每当我在我的 postgres 数据库中添加一条记录时,Node.js 都会将该行的内容打印到控制台。 我正尝试按照这些指
在今天晚上之前我卸载了 vscode 并再次安装后一切正常我在尝试运行 npm run app 时遇到了这个问题我不知道如何解决这个问题我试图运行 vs 代码和命令提示符或 bash 使用以管理员身份
我目前正面临一个我无法解决的错误,我已经苦苦挣扎了几个小时。 我正在使用以下版本: Node :8.11.3 express :4.16.3 Jest :22.2.2 Mongoose :5.2.3
我正在尝试为网站上的特定 url 部署使用 node.js 开发的服务器。 已经有一个服务器可以覆盖网站上的所有网址,我希望我的唯一答案是 the_website_url/my_specific_ur
我是一名优秀的程序员,十分优秀!