public void setFrame(int frameNum, byte[] theFrame) throws SoundException
  {
    if(frameNum >= getAudioFileFormat().getFrameLength())
    {
      printError("That frame, number "+frameNum+", does not exist. "+
                 "The last valid frame number is " + 
                 (getAudioFileFormat().getFrameLength() - 1));
    }
    int frameSize = getAudioFileFormat().getFormat().getFrameSize();
    if(frameSize != theFrame.length)
      printError("Frame size doesn't match, line 383.  This should" +
                 " never happen.  Please report the problem to a TA.");
    for(int i = 0; i < frameSize; i++)
    {
      buffer[frameNum*frameSize+i] = theFrame[i];
    }
  }