String file = StreamRepository.getInstance().getStream(name); if (file.endsWith(".mp3")) { if (numberOfBuffers < 8) numberOfBuffers = 8; setStream(new LWJGLMP3Stream(file)); } if (file.endsWith(".wav")) { setNumberOfBuffers(1); setStream(new LWJGLWaveStream(file));
if (playList != null && playList.hasNext()){  }else { String file = StreamRepository.getInstance().getStream(name); if (file.endsWith(".mp3")) { if (numberOfBuffers < 8) numberOfBuffers = 8; setStream(new LWJGLMP3Stream(file)); } if (file.endsWith(".wav")) { setNumberOfBuffers(1); setStream(new LWJGLWaveStream(file)); }
	public void play(String name) {		String file = StreamRepository.getInstance().getStream(name);		if (file.endsWith(".mp3")) {			if (numberOfBuffers < 8)				numberOfBuffers = 8;			setStream(new LWJGLMP3Stream(file));		}		if (file.endsWith(".wav")) {			setNumberOfBuffers(1);			setStream(new LWJGLWaveStream(file));		}		player = new BufferedPlayer();		player.start();		playing = true;		paused = false;	}