public WaveFileObuffer(int number_of_channels, int freq, String FileName)
  {
  	if (FileName==null)
		throw new NullPointerException("FileName");
	
	buffer = new short[OBUFFERSIZE];
	bufferp = new short[MAXCHANNELS];
	channels = number_of_channels;
	
	for (int i = 0; i < number_of_channels; ++i) 
		bufferp[i] = (short)i;
	
	outWave = new WaveFile();
	
    int rc = outWave.OpenForWrite (FileName,freq,(short)16,(short)channels);
  }