2
votes

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.

1

1 Answers

2
votes

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.