public void playAudio(String key) { ResourceModel r = resources.get(key); if (r != null && r.getDataType().equals(ResourceModel.AUDIOSTREAM)) { AudioStream as = r.getAudioStream(); AudioPlayer.player.start(as); r.setAudioStream(loadAudio(r.getFilePath())); } }
public AudioStream getAudioStream(String resourceName) { ResourceModel rm = resources.get(resourceName); if (rm == null) return null; return rm.getAudioStream(); }