2
\$\begingroup\$

I'm in the process of learning DirectX and in the book examples they have a very basic application which sets up DirectX and displays a blank screen. When I run this app however my computer starts making a whistling noise and I'm really curious as to why it does this.

If I maximize the screen the noise stops and this is the only time the noise happens. When I play normal games, run apps in XNA or do anything that doesn't involve directly using DirectX it doesn't happen.

The FPS is going up to 3000-4000 when the app is running and drops down to 1000 when the window is made to stretch the screen (and the noise stops). I'm taking a guess and saying it's something to do with that?

Anyway, does anyone have any ideas on what is creating this noise?

Thanks

\$\endgroup\$
3
  • 4
    \$\begingroup\$ Since you have no frame limiting maybe that's the sound of your GPU fan at max speed. \$\endgroup\$ Nov 17 '13 at 21:52
  • 1
    \$\begingroup\$ Actually I get the same problem, but it's not the fan. The card itself can make this noise (or the cpu, or other things). Limiting the fps does fix it, though. See here: techpowerup.com/forums/showthread.php?t=98939 \$\endgroup\$ Nov 17 '13 at 22:39
  • 2
    \$\begingroup\$ Could be capacitor whine. \$\endgroup\$
    – jmegaffin
    Nov 17 '13 at 23:40
2
\$\begingroup\$

In most cases this is due to excessive framerates causing audible-frequency power fluctuations on the GPU. Certain elements like capacitors (to steady the power line voltage) will actually physically vibrate if they're doing enough work. To avoid this, set SyncInterval to 1 in the argument to IDXGISwapChain::Present. This will lock your framerate to the maximum display framerate, and sleep the thread if it finishes rendering early.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.