Code example for SourceDataLine

Methods: write

0
    	} 
    } 
     
    private void playJavaSound(IAudioSamples aSamples) {
    	byte[] rawBytes = aSamples.getData().getByteArray(0, aSamples.getSize());
    	mLine.write(rawBytes, 0, aSamples.getSize());
    } 
     
    static public void main(String[] args) {
    	try { 
    		// a little test routine 
    		RapidEvolution3.loadLog4J(); 
    		XugglePlayer player = new XugglePlayer();
    		player.open("C:\\Users\\Jesse\\Desktop\\new music\\Smells-like-teen-spirit-Dual-Remix.mp3");
    		if (player.isFileSupported()) {
    			log.info("duration=" + player.getTotalTime() + "s");
    			player.start();
    			log.info("started"); 
    			Thread.sleep(5000);
    			player.pause();
Contextual code suggestions in your IDE  Get Codota for Java