well you probably have a never-ending stream. You'll just fill up your hard disk. I'd recommend only passing something that actually ends in.
Or don't use CreateWaveFile, actually write audio to a WaveFileWriter yourself.
Or don't use CreateWaveFile, actually write audio to a WaveFileWriter yourself.