SoxSharp
SoxSharp copied to clipboard
How to use multiple command padding and mixing?
How to use multiple command padding and mixing? like this : > sox longTimeAutio.wav -p pad 5 0 | sox - -m shortTimeAudio.wav combined.wav
Command piping is not supported by SoxSharp. However, I think you can get the same result using the command sox.exe -m shortTimeAudio.wav longTimeAudio.wav combined.wav delay 5, which will mix the two files, starting shortTimeAudio.wav with a delay of 5 seconds into longTimeAudio.wav.
This can be coded using SoxSharp as:
using (var sox = new Sox("sox.exe"))
{
sox.CustomEffects = "delay 5";
sox.Process(new string[] { "shortTimeAudio.wav", "longTimeAudio.wav" }, "combined.wav", CombinationType.Mix);
}
(The delay effect is not currently implemented in SoxSharp, so it needs to be entered through the CustomEffects property).