I have two signals (out of wav files), both are mono wav files of 37500 Hz sample rate.
I apply superimposing ("+") operation for the two Discrete signals:
// shiftedSignal is output.wav
// outSignal is saved_mono.wav
//This is how I read it:
WaveFile shiftedWav;
using (var stream = new FileStream("output.wav", FileMode.Open))
{
shiftedWav = new WaveFile(stream);
}
DiscreteSignal shiftedSignal = shiftedWav[Channels.Left];
DiscreteSignal mergedSignal = shiftedSignal + outSignal;
waveFileOut = new WaveFile(mergedSignal);
using (var stream = new FileStream("merged.wav", FileMode.Create))
{
waveFileOut.SaveTo(stream);
}
As the result, I have merged.wav file and it has a giant peak in the middle:
Both input wav files have the same sample rate of 37500 and the same bitrate of 600 kbps.
Where did it come from and how do I fix it?
Just to make sure, I tried to concatenate these signals:
DiscreteSignal mergedSignal = shiftedSignal.Concatenate(outSignal);