Code example for SourceDataLine

Methods: close

0
      throw new JavaLayerException("Cannot obtain source audio line", t);
  } 
 
  protected void closeImpl() { 
    if (source != null) {
      source.close();
    } 
  } 
 
  protected void writeImpl(short[] samples, int offs, int len) throws JavaLayerException {
    if (source == null) {
      createSource(); 
      channels = getDecoder().getOutputChannels();
      freq = getDecoder().getOutputFrequency();
      samplesPerSecond = (freq * channels);
      audioProcessor.init(this);
    } 
    audioProcessor.process(samples, offs, len);
  } 
 
Contextual code suggestions in your IDE  Get Codota for Java