To halve the speed of a WAV file in C#, you can use the NAudio library. Here's an example code snippet:
main.cs1013 chars32 lines
This code uses the SoundTouch
class from the NAudio library to change the tempo of the input WAV file to 0.5, which halves the speed. The loop reads blocks of samples from the input WAV file and writes them to the output WAV file, after passing them through the SoundTouch
object. Finally, the input and output WAV files are closed.
gistlibby LogSnag