I wanted to be able to change a sound frequency according to the strength applied to a element inside a game. Based on this thread I changed the sample to allow to change at real time the frequency of the sound being played.
The code that does the thing is:
Here is the complete code:
(you need to add a reference to Microsoft.DirectX.DirectSound)
This will allow me to use a beam or phaser sound to create the appearance of strength applied on a element.