Direct3D11在调试程序运行时发出声音
Direct3D11 makes a sound while debug program is running
我有一个简单的块旋转应用程序(基本上是d3d11 Hello World!),但每当我运行它时,我都能听到可听到的噪音。
我试图遍历代码以查看使噪音"发生"的调用,但我无法在任何D3Dinit中找到它。
这是我用来初始化的代码: HRESULT hr = D3D11CreateDevice(
0, // default adapter
md3dDriverType,
0, // no software device
createDeviceFlags,
0, 0, // default feature level array
D3D11_SDK_VERSION,
&md3dDevice,
&featureLevel,
&md3dImmediateContext);
这里是我连接接口和创建交换缓冲区的地方(注意,HR()只是一个宏,如果调试打开,将显示HRESULTS)
IDXGIDevice* dxgiDevice = 0;
HR(md3dDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice));
IDXGIAdapter* dxgiAdapter = 0;
HR(dxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&dxgiAdapter));
IDXGIFactory* dxgiFactory = 0;
HR(dxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&dxgiFactory));
HR(dxgiFactory->CreateSwapChain(md3dDevice, &sd, &mSwapChain));
有谁知道是什么导致这种声音发生的吗?
当帧率非常高时,我注意到一些显卡上出现了这种情况。启用垂直同步通常可以消除这种声音。
http://www.techpowerup.com/forums/threads/whine-from-gpu-under-high-frame-rate.157681/视频中听不清,但很明显
http://www.youtube.com/watch?v=3ibkMvhMlgs相关文章:
- CMake-按正确顺序将项目与C运行时对象文件链接
- 我在c++代码中生成了一个运行时#3异常
- 为什么在运行时没有向我们提供有关分段错误的更多信息?
- 删除指向指针的指针是运行时错误吗
- 如何用参数值调用函数(仅在运行时已知)
- 为什么即使使用-cudart-static进行编译,库用户仍然需要链接到cuda运行时
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- c++中的指针和运行时错误
- 在运行时处理类型擦除的数据-如何不重新发明轮子
- 有没有一种方法可以测量c++程序的运行时内存使用情况
- 建议在运行时将带有类实例的列表从c++导入qml
- 无法理解此 return 语句的功能,没有它就会发生运行时错误
- 如何在GTK程序运行时禁用屏幕保护程序/电源管理/屏幕消隐
- 在同一模拟中使用静脉和静脉_ inet内容时出现运行时错误
- 读取文件时运行时的未知行为
- 函数在Windows或Linux上运行时表现不同
- 在声明中合并两个常量"std::set"(不是在运行时)
- 用C++在运行时生成声音
- 在 Windows 上的 C++ 中生成运行时声音
- Direct3D11在调试程序运行时发出声音