2

How can I make the PC bored buzzer beep in Windows 10 with a C program?

I try the fast way

printf("\a"); 

This outputs a sound to the device speaker, but how can I make it beep on the motherboard buzzer?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
郭維倫
  • 39
  • 6
  • Related: https://stackoverflow.com/questions/4665282/simulation-of-pc-speaker-in-windows-7 – Andreas Wenzel Oct 04 '21 at 10:01
  • 1
    [Related question](https://stackoverflow.com/questions/38883092/how-to-make-motherboard-beep-through-c-code). From one of the answers, it appears that an OS-modification is required. I don't know of any other solution, though. – Luca Polito Oct 04 '21 at 10:02
  • 2
    Does your motherboard have a physical buzzer? If it's a fairly new one they might have removed it. – Lundin Oct 04 '21 at 10:05
  • 1
    I believe the buzzer is right next to the ISA slots. – stark Oct 04 '21 at 11:51
  • @Lundin yes I'm sure i had one . booting PC have beep sound, phy buzzer is working fine. – 郭維倫 Oct 05 '21 at 01:19
  • Probably not possible. See https://learn.microsoft.com/en-us/windows/win32/api/utilapiset/nf-utilapiset-beep – Mark Ransom Aug 01 '22 at 04:00

0 Answers0