I have two raw sound streams that I need to add together. For the purposes of this question, we can assume they are the same bitrate and bit depth (say 16 bit sample, 44.1k
If you need to do this right, I would suggest looking at open source software mixer implementations, at least for the theory.
Some links:
Audacity
GStreamer
Actually you should probably be using a library.