private boolean loadAudio(boolean checkMemoryFirst) {
		try (AudioInputStream s = AudioSystem.getAudioInputStream(new File(filename))){
			this.format = s.getFormat();
			
			//Checks the memory if needed. If the flag is true and the memory is not sufficient, 
			//this sound will refrain from loading until it needs to.
			if(checkMemoryFirst && MemUtil.getFreeMemory() < s.getFrameLength() * format.getFrameSize())
				return false;
			
			this.audioData = new byte[(int) (s.getFrameLength() * format.getFrameSize())];
			//Load all data.
			int curr = 0;
			while(curr < audioData.length) {
				curr += s.read(this.audioData, curr, audioData.length - curr);
			}
			
			s.close();
			return true;
		} catch (UnsupportedAudioFileException | IOException e) {
			System.out.println("Could not read AudioData.");
			return false;
		}
	}