c# - Converting wav file to mono -
i'm trying convert stereo .wav file mono using naudio. 1 requirement cannot use native calls, need run code on azure. here's came with:
using (var wavefilereader = new wavefilereader(sourcefilename)) { var tomono = new stereotomonoprovider16(wavefilereader); wavefilewriter.createwavefile(destfilename, tomono); } my code works without errors, output file contains pure silence.
is there other way convert file mono?
you need provide values leftvolume , rightvolume properties of stereotomonoprovider16. example, set them both 0.5f mix channels, or set left 1.0 , right 0.0 discard right channel
Comments
Post a Comment