Code example for SourceDataLine

Methods: startopen

0
			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)