Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Adjust wav file amplitude and frequency

$
0
0
Hello,

I am working on a project where I am simulating the ground run of a jet engine. For this, I'm playing various sounds using NAudio and they all work fine. My problem is that when the engine is running and I adjust the throttle position I need to also adjust the amplitude and frequency of the EngineRunning sound. Is there a way to do this in NAudio? Failing that, is there a simple way to adjust the sound volume while it's playing? I had a quick look into using WaveChannel32 and adjusting the volume through that but I couldn't seem to get it to work. I am currently playing sounds using WaveOut and LoopStream as I need the sounds to keep playing until I change something in the simulation:
WaveFileReader mAudio = new WaveFileReader(mMap.GetFile(soundName));
LoopStream loop = new LoopStream(mAudio);
WaveOut mPlayer = new WaveOut(WaveCallbackInfo.FunctionCallback());
mPlayer.Init(loop);
mPlayer.Play();
Any help would be greatly appreciated.

Martin

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>