Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: WaveChannel32.Read never returns 0

$
0
0

I was trying to convert 16bit PCM files to IeeeFloat and encountered a problem where the files grew until hitting the 2GB limit.My code was:

 

publicstaticvoid ImportAudio3(string sourceFileName, string targetFileName) {using (var reader = new WaveFileReader(sourceFileName)) {using (var channel = new WaveChannel32(reader)) {
			WaveFileWriter.CreateWaveFile(targetFileName, channel);
		}
	}
}

Is it intended that WaveChannel32.Read() never returns 0 or is it a bug?

I just realized that I can avoid using WaveChannel32 by using AudioFileReader and passing that directly to WaveFileWriter.CreateWaveFile, but I still thought I'd ask because I'm using WaveChannel32 in other places.


Viewing all articles
Browse latest Browse all 5831

Trending Articles