Code example for SourceDataLine

Methods: close

0
		setPlaying(false); 
	} 
	 
	public void end() 
	{ 
		line.close();
	} 
	 
	private int calculateWaveSample(int i)
	{ 
		if (useDynAmp )
			return (int)((sineAmplitude(Math.log(frequency))/100.0)*(32767.0 * Math.sin((i*RAD* frequency) / sampleRate)));
		else 
			return (int)((amplitude/100.0)*(32767.0 * Math.sin((i*RAD* frequency) / sampleRate)));
	} 
		 
	//****************************************************************************** 
	// END SOUND METHODS 
	// BEGIN GET/SET METHODS 
	//******************************************************************************