0

Before I explain this I want to say that I know this is a very vague bug, it's just I have absolutely no idea what might be causing this.

Okay, the problem is that when my program is running there is a very quiet screeching sound coming from the PCs speakers (It's really hard to hear from speakers sometimes but it's quite clear when using headphones). This screeching sound happens even if the speakers are muted.

I recently started using irrKlang for my program's audio but it isn't being caused by that because I checked a build of my program which didn't have it and the screeching sound is still there.

The sound changes in pitch when my program is in a different state, and in each state the processor is being given more taxing processes to compute. So different loads on the CPU causes the sound to change.

There's not much else I can think of to describe it, if it will help I can post a link to my program so someone can have a listen.

I'm using C#, with SharpDX if this is any helpful information (I was going to post a question on the SharpDX forumn but it colsed recently).

Thanks for your time!

Joseph Little
  • 921
  • 3
  • 13
  • 22
  • 2
    You should try your program on other computers to see if you can reproduce the problem. It might simply be some "sound leakage" in your hardware. – Robert Harvey Sep 23 '13 at 19:53
  • And after @RobertHarvey 's idea, you should have someone else run your program to make sure it's not your hearing/imagination – Jonesopolis Sep 23 '13 at 19:54
  • Both computers I've ran my program on personally have had the problem, plus one other person has mentioned it when they've ran the program on their machine (I think they were the only person who was using headphones as well, so it looks like it's happening on every machine) – Joseph Little Sep 23 '13 at 19:55
  • Then you're going to have to show us some code that reproduces the problem. – Robert Harvey Sep 23 '13 at 19:58
  • @RobertHarvey I have no idea which part of my code might be producing the problem, there's no audio related code which produces the problem (Because the problem is still there after I remove anything to do with audio). I'm going to post a link to a download for my VS solution – Joseph Little Sep 23 '13 at 20:01
  • 3
    No, don't do that. We're not a comprehensive troubleshooting service. Try to find the smallest piece of code that duplicates the problem. See also http://SSCCE.org – Robert Harvey Sep 23 '13 at 20:03

1 Answers1

2

I've solved the problem.

It's somehow related to the graphics card producing signal noise which the sound card picks up, or at least that's how I understood it.

The cause of the problem was that I had disabled Vertical Sync in my program and the refresh rate was causing the problems that way.

I've re-enabled Vsync in my program and the issue has gone.

Thanks for the help anyway!

Joseph Little
  • 921
  • 3
  • 13
  • 22
  • 2
    I was about to tell you this. Disabling vertical sync can result in the GPU running several thousand FPS, which is not good, and makes these noises. There is NO reason to disable vertical sync in a game :) – Stig-Rune Skansgård Sep 24 '13 at 10:45