This project has moved and is read-only. For the latest updates, please go here.

Can you do a iSampleProvider chain?

Feb 13, 2013 at 3:17 PM
If you have a couple ISampleProviders, for instance: one to perform a BassTreble adjustment and then let's say another do perform some kind of filter adjustment, how can you make it them work together in one player. I can see individual ISampleProvider examples in the source download, don't haven't seen (as far as I can tell) a way to chain them?

Am I missing something? Or, do I have to build one ISampleProvider which would a list of other ISampleProviders similar to the effect chain in the skype example?

Feb 15, 2013 at 11:40 AM
yes, that is the idea of ISampleProviders. Just make lots of implementations of them. In the Read method, read from the source ISampleProvider, and apply the effects. No need to have a single class managing them all unless you need to swap them in and out, or change their order etc.

Feb 15, 2013 at 2:18 PM
Is there a way to couple the ISampleProvider's with the BufferedWaveReader? Right now, without any effects, we have a BufferedWaveReader reading in the samples, filling in the buffer and we are hearing the audio. How would we plugin a ISampleProvider within the stream?

Is there an example that we can use that utilizes this combo where one format is byte[] and another is float[]?

Feb 15, 2013 at 2:22 PM
there is an adapter class - something like Pcm16WaveToSampleProvider (assuming you have 16 bit audio in your BufferedWaveProvider)