Inserting silence at repeated intervals

Jun 23, 2011 at 10:27 AM

Hi All,

How do I set the the volume to zero (mute) at repeated intervals in a wave file?

If possible I would like to do this in memory and use the output as a base track for mixing with other wave files into a mix.

To explain my objective: We building a basic online music mixer where the user selects a predefined base track. He can then mute this basetrack at specific points for N duration and repeated intervals. He can then add aditional loops (<15 sec) on top of this base track to create his own mix. Simple in concept right?

I got the mixer working but I just cant figure out how to create the muted sections on the basetrack.

Any help would be much appreciated.

Thanks in advance.

Great library by the way. Cheers.

Jun 26, 2011 at 2:53 PM

I'd just create a class deriving from IWaveProvider, that reads from your real WaveFile but during silence portions just fills the output buffer with zeroes in the Read method.