Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Mixing multiple WaveStreams

$
0
0

You can just ignore the position and length of input streams in your mixing class. IWaveProvider doesn't have Position and Length properties - you just need to implement Read. In Read, simply read from all your source streams, and mix together whatever returns. If some of the inputs have ended already, they will just return 0 from their Read method. You could either just always return count from Read, making a never-ending stream, or return the max number of bytes read from any of your inputs.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>