Generating sound in c#

Sep 12 2009 10:28 PM
Hi,

I am currently trying to generate sounds for a project I am working on. I need to be able to produce a beep* sound based on a "frequency" and "decibel" level (it does not need to be accurate as the sound in mainly feedback for the user, but you should hear a difference that seems realistic). I am looking for advice on whether my idea makes sense or not.

Frequency does not appear to be an issue, being one of the parameter of the console.Beep function for instance; decibel might be a bit more tricky though.. I didn't find anything related to decibel in sound generation in c#, so my idea was to play on the current output volume to 'fake' changing the decibel output while playing my Beep on the set frequency =).

My first question is, does that somehow make sense? ^^' If not what would you do?

Then, in case you have any lead on how to programmatically change the output volume of speakers, please throw them that way, I must confess it's my first time doing things like that.

Thanks for your time.


Answers (2)