why do computers sometimes make horrible buzzing sounds when crashing/locking up?

446 views

Just had this happen to me for the first time in a while and it always catches me off guard.

To give my example, I was listening to music on my PC, and mid-song the PC completely locked up and a loud buzzing sound came through my headphones. I’ve had it happen in the past with other PCs and with game consoles as well, but why does it happen?

In: Technology

3 Answers

Anonymous 0 Comments

[removed]

Anonymous 0 Comments

The sound hardware in a PC is designed to work with as little interference from the CPU as possible. To that end, it’s generally set up so it can play a chunk of audio from memory without interference–all the CPU needs to do is update the location the audio hardware is playing from every now and again. If the system has completely locked up and is no longer responding, the audio hardware will often just keep playing the last little bit of sound it was told to over and over again–depending how long that sound fragment was you might get an obviously repeated bit of music, or just a buzzing.

Anonymous 0 Comments

Sound is typically loaded into something called a buffer. The entire music file is a really big chunk of data, and it’s too big to load at once. So instead, it’s loaded piece by piece into a small bucket called the buffer. The buffer is typically quite small, and holds maybe a few milliseconds of sound at a time.

There’s a part of your computer called the audio driver that is responsible for playing that buffer over and over again, on a loop. That’s all it does, it just blindly takes whatever is in the buffer, and plays it. It’s the program’s responsibility to constantly refill the buffer with the correct part of the music file at the correct time in order to play the song as intended, or to empty the bucket if it wants to stop playing sound.

When your computer crashes or lags, sometimes the program dies before the audio driver does. So the audio driver keeps dutifully playing the same buffer over and over again, with no program running to refill the buffer with new data. This same millisecond-long audio clip getting repeated over and over again really quickly is the buzzing sound you hear.

This can also sometimes happen in non-crashing situations too, for example if the program lags and doesn’t get to the buffer-refilling part in time due to being busy with other work.