Package org.newdawn.slick.openal

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


 
  /**
   * 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

  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

   *
   */
  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

   *
   */
  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

Related Classes of org.newdawn.slick.openal.Audio

Copyright © 2018 www.massapicom. 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.