Need help shuting off my PC speaker.

Started by
6 comments, last by otto77 21 years, 1 month ago
Does anyone know how to stop a PC speaker from making that god-awful clicking noise when you hold down a key for too long? I am writing a game using Visual C++: DirectX and MFC - I use DirectInput for the keyboard input. The game is like PAC-MAN, and so you have to use the arrow keys to move. For the first few minutes this is fine, but then the PC speaker starts going crazy every time you hit a key. Is there a simple C++ function to silence the speaker? Or, a way to do it using DirectSound?
Advertisement
unplug it
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
What you do is take off the computer case and find the PC speaker (usually stuck to the bottom or the front of the case).. trace the wire to the motherboard and unplug it there.. other than that, i have no idea.. i use the windows messaging system to tell me what keys have been pressed and i never seem to have any trouble.. and i haven''t seen that problem in the directinput examples i''ve seen... perhaps you haven''t taken full control of the input? i have no idea.. i don''t even use directx..
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
that clicking means you might be doing something wrong in your code though. it''s the buffer telling you it''s full.
quote:Original post by sporff
that clicking means you might be doing something wrong in your code though. it''s the buffer telling you it''s full.


hmmm...do you know of a function to clear the full keyboard buffer?
Sounds like you aren''t processing any window''s messages sent to your app.
quote:Original post by Hoser
Sounds like you aren''t processing any window''s messages sent to your app.


You''re right, I structured things so that I could avoid the Windows message pump. Is there a message that I can send before I get into the real program processing to tell the Windows keyboard buffer to not fill up...or else to just turn off the PC speaker? The game works fine - it''s just that damn speaker noise.

Or you''re pushing too many keys at once. This happened a lot in Jedi Knight (the original).

This topic is closed to new replies.

Advertisement