public Player(File file)
	{
		// prend un fichier et test quel est son extention (mp3, ogg, wav, flac)
		boolean b = Pattern.matches(".*\\.mp3$", file.getName());
		InterfaceAudioFileDecoder result = null;
		if(b)
		{
			result = new AbstractNonWaveReader(file);
		}
		b = Pattern.matches(".*\\.wav$", file.getName());
		if(b)
		{
			result = new MusicWave(file);
		}
		b = Pattern.matches(".*\\.flac$", file.getName());
		if(b)
		{
			//result = new MusicFlac(file);
		}
		b = Pattern.matches(".*\\.ogg$", file.getName());
		if(b)
		{
			result = new AbstractNonWaveReader(file);
		}
		if ( result != null)
		{
			setStream(result);
		}
		else {
			System.out.println("The file "+file.getName()+" have an unrecognized type");
		}
	}