// figure the audio bytes
int nAudioBytes = nAudioBlocks.value * WaveFormatEx.nBlockAlign;
// start the encoder
if (nHeaderBytes.value > 0) spBuffer = new byte[nHeaderBytes.value];
spInputSource.GetHeaderData(spBuffer);
spAPECompress.Start(pOutputFilename, WaveFormatEx, nAudioBytes,
nCompressionLevel, spBuffer, nHeaderBytes.value);
// set-up the progress
ProgressHelper spMACProgressHelper = new ProgressHelper(nAudioBytes, progressor);