Monday, March 21, 2011

Merging Wav Files in Objective C.

http://eigenclass.blogspot.com/2010/12/merging-wav-files-in-objective-c.html

Merging Wav Files in Objective C.
On a recent Mac Development project I had to merge to audio inputs into a single file which was an interesting exercise in understanding the rfc wav spec. While concatenation of wav files is simpler since you just have to remove the header from one file and update the header in the other file to reflect the new file size, merging two sounds so that they play simultaneously is a little bit trickier. I've decided to post my objC implementation here in case someone else ever runs into a similar need. Suggestions and comments as usual are always welcome. Especially in regards to clamping the new values uint values to a max which I've ignored in this implementation since it didn't seem to affect the output merged sound I was creating negatively.

1 comment: