KMSayre
KMSayre

Reputation: 21

Create WAV From One WAV for Left Channel & One WAV for Right Channel Using NAudio

I'm completely new to audio in .NET, so bear with me.

My goal is to create a single wav file with two channels. The left channel will consist of a voice message (stream generated using SpeechSynthesizer), and the right channel needs to be a simple tone at a given single frequency.

To complicate things a little more, I also need for the right channel tone to "bookend" the message meaning that it starts a couple seconds before the left channel audio and then continues a couple seconds after.

I've found this blog http://mark-dot-net.blogspot.com/2009/10/playback-of-sine-wave-in-naudio.html about creating the sine tone for a given frequency, but haven't found anything on combining two files with one's audio completely on one channel and the other on the other channel.

Thanks in advance for any help.

Upvotes: 2

Views: 1336

Answers (1)

Mark Heath
Mark Heath

Reputation: 49482

You can use the MultiplexingSampleProvider for this purpose, to creae a combined stereo stream that takes its left and right channels from two individual SampleProviders.

Upvotes: 2

Related Questions