Hi, many thanks for the great library! I've just started using it and I have a few questions.
My application is placing various wav sounds (read from wav files) into a "master" output file at various locations. I allow the user to specify the Pan, Volume and Time when placing the input into the output mix. Also the input files
may be of different wav formats (e.g. 16-bit/32-bit, float/pcm, and so on).
So far the approach I'm using is to read them in using WaveFileReader, pass that into a WaveChannel32 to control Pan/Volume and convert them to 32-bit float. Then I create a WaveOffsetStream to specify the Time offset, and add that to a WaveMixer32
to generate the output file.
However, the problems I've hit are:
1) If the input is already 32-bit the WaveChannel32 rejects it (it only accepts 16-bit PCM)
2) The WaveOffsetStream only accepts PCM, so I'm having to down-grade the input back to 16-bit PCM
3) the WaveMixer32 only accepts 32-bit float, so I have to re-upgrade it back up to 32-bit float to add it here.
So far my naive approach for #2 and #3 above is to simply convert them in between steps using Wave32To16Steam and WaveChannel32 as needed. But this seems like alot of unecessary conversions and extra code to deal with. Is there a simpler
way to do this, or would it be beneficial for me to create additional WaveChannelNN classes to handle the various types of input? I would be happy to contribute any additional wav stream classes I come up with, if they fit into the architectural model
you have in mind.
I suppose another solution would be to change the order of operations such that I read the file, add it to the WaveOffsetStream (still in original format), and *then* create a WaveChannel32 to alter the volume/pan. However, I currently let the user
preview the altered sample before adding it to the output so I would have to do that separately. Also this does not solve the problem #1 above.
Any input would be greatly appreciated. Again, thank you for providing this nice library!