I'm using NAudio to generate and play sound waves in runtime.
I've managed to get a sine wave generated using this tutorial: http://mark-dot-net.blogspot.com/2009/10/playback-of-sine-wave-in-naudio.html
However - what I really need is to be able to add many individual waves to a WaveMixerStream, in runtime.
I understand that to do this I need individual WaveStreams but I don't know how to turn the output from WaveProvider into a WaveStream to add to the WaveMixerStream.
I assume this isn't possible so altered the code to give a derived WaveStream Class.
I've added:
public override long Length
{
get { return long.MaxValue; }
}
But I'm not sure how to get the position:
public override long Position
{
get
{
return //What here?
}
set
{
// What here? = value;
}
}
So the question is: 1. Will this work? 2. How do I get/set position?
Thanks in advance.