protected void createSource() throws JavaLayerException
    {
        Throwable t = null;
        try
        {
			Line line = AudioSystem.getLine(getSourceLineInfo());
            if (line instanceof SourceDataLine)
            {
         		source = (SourceDataLine)line;
                //source.open(fmt, millisecondsToBytes(fmt, 2000));
				source.open(fmt);
                /*
                if (source.isControlSupported(FloatControl.Type.MASTER_GAIN))
                {
					FloatControl c = (FloatControl)source.getControl(FloatControl.Type.MASTER_GAIN);
                    c.setValue(c.getMaximum());
                }*/
                source.start();

            }
        } catch (RuntimeException ex)
          {
			  t = ex;
          }
          catch (LinkageError ex)
          {
              t = ex;
          }
          catch (LineUnavailableException ex)
          {
              t = ex;
          }
		if (source==null) throw new JavaLayerException("cannot obtain source audio line", t);
    }