Examples of Audio


Examples of org.internna.iwebmvc.model.core.Audio

        this.decipherer = decipherer;
    }

    @SuppressWarnings("unchecked")
    public Audio getAudio(String text) throws IllegalArgumentException {
        Audio doc = new Audio();
        Properties properties = new Properties();
        try {
            properties.load(IOUtils.toInputStream(text));
            String uri = properties.getProperty("uri");
            Assert.isEncrypted(decipherer, uri);
            if (doc == null) doc = new Audio();
            doc.setUri(decipherer.decrypt(uri));
            doc.setMimeType(properties.getProperty("mimeType"));
            doc.setIdentifier(properties.getProperty("identifier"));
            doc.setCreated(dateFormat.parse(properties.getProperty("created")));
            doc.setSizeInBytes(Long.parseLong(properties.getProperty("sizeInBytes")));
            return doc;
        } catch (Exception ex) {
            if (log.isDebugEnabled()) log.debug("Could not completely bind [" + text + "] as an Audio: " + ex.getMessage());
        }
        return null;
View Full Code Here

Examples of org.internna.iwebmvc.model.core.Audio

        for (String doc : text.split("##")) {
            if (StringUtils.hasText(doc)) {
                if (doc.startsWith("-")) {
                    Iterator<Audio> it = docs.getPlayList().iterator();
                    while (it.hasNext()) {
                        Audio d = it.next();
                        if (doc.substring(1).equals(d.getUri())) it.remove();
                    }
                } else {
                    Audio document = getAudio(doc);
                    if (document != null) docs.addAudio(document);
                }
            }
        }
        setValue(docs);
View Full Code Here

Examples of org.newdawn.slick.openal.Audio

    beat_loop = loadAudio("beat_loop");
  }

  public Audio loadAudio(String s)
  {
    Audio audio = null;
    try {
      audio = AudioLoader.getAudio("OGG", ResourceLoader.getResourceAsStream("res/audio/"+s+".ogg"));
    } catch (IOException e) {}
    return audio;
  }
View Full Code Here

Examples of org.newdawn.slick.openal.Audio

 
  /**
   * Loads the files
   */
  private void loadFiles() {
    Audio a;
    for (String key : m_fileList.keySet()){
      try {
        a = AudioLoader.getAudio("OGG", FileLoader.loadFile(m_audioPath + m_fileList.get(key)));
        /* For some reason it reads intro and gym wrong so do this to fix it */
        if(key.endsWith("introandgym"))
 
View Full Code Here

Examples of org.newdawn.slick.openal.Audio

  public static void loadSounds(AudioLoadList sll) {
    long ms = System.currentTimeMillis();
    for(AudioLoadObject alo : sll.getAudioLoadObjects()) {
      try {
        InputStream i = resObject.getClass().getResourceAsStream(alo.getFilename() + ".ogg");
        Audio a = org.newdawn.slick.openal.AudioLoader.getAudio("OGG", i);
        audio.put(alo.getSavename(), a);
      } catch (Exception e) {
        Logger.info("Error while loading " + alo.getFilename() + ".ogg");
        e.printStackTrace();
      }
View Full Code Here

Examples of org.newdawn.slick.openal.Audio

   *
   */
  public static void loadSoundEffect(String Name) throws IOException {

    // temp texture to be loaded into the textureMap
    Audio sound = null;

    // load texture into game
    sound = AudioLoader.getAudio("OGG",
        ResourceLoader.getResourceAsStream("res/sounds/" + Name + ".ogg"));
    // logging message
View Full Code Here

Examples of org.newdawn.slick.openal.Audio

   *
   */
  public static void loadSong(String Name) throws IOException {

    // temp texture to be loaded into the textureMap
    Audio song = null;

    // load texture into game
    song = AudioLoader.getAudio("OGG",
        ResourceLoader.getResourceAsStream("res/sounds/" + Name + ".ogg"));
    // logging message
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.