Combining .wav files

  • Thread starter Thread starter Adam Clauss
  • Start date Start date
A

Adam Clauss

Alright, I have a need to combine 2 (or possibly more - figure if I can get
two working, more won't be hard) .wav files into one .wav file.

Now, it is relatively easy enough for me to read in the wav headers and
physically combine the data blocks. The problem is, the .wav files could
quite possibly be different rates - which makes "combining the data blocks"
a lot more complicated.

So, is there any libraries or such that can assist in this. I spent some
time on google, but did not come up with anything. It seems I might be able
to use DirectSound to do this for me? Or some other method?

I appreciate any advice you might have.

Thanks!
 
Adam said:
Alright, I have a need to combine 2 .wav files into one .wav file.
[...]
So, is there any libraries or such that can assist in this. I spent
some time on google, but did not come up with anything.

This isn't a C# question, but I'll try to answer it in a relevent way.

It depends what you mean by "combine". In any case, what you're asking to do
is probably some form of audio signal processing
(http://www.google.com/search?&q=audio+signal+processing). If you want to
create a sound where you can hear both sounds at once, all you have to do is
sample up the one at a lower sample rate and then average the signals. I'm
not aware of any audio signal processing libraries for .NET, but there are
C++ libraries which you could wrap with a COM component and then use from
your .NET program using the COM interoperability. For example, there's this
one, which is under a permissive LGPL license:

Open Source Audio Library Project: http://osalp.sourceforge.net/

I hope this helps. Please write back with more details if I misunderstood
you or you need more help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top