Examples of Sound


Examples of soc.qase.state.Sound

/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
  private Sound processSound()
  {
    Sound result = null;
    int sound = 0;

    result = new Sound();

    // process sound
    if((bitmask & 0x04000000) != 0) {
      sound = (int)data[offset];
      if(sound < 0) sound = sound + 256;
      result.setLoop(sound);
      offset = offset + 1;
    }
    return result;
  }
View Full Code Here

Examples of sounds.Sound

  }
 
  public void old() {
//    Sound sound = new OggSound("SoundMeni.ogg");
//    Sound sound = new OggSound("Groove Grove.ogg");
    Sound sound = new WavSound("end.wav");
    sound.play();
    Scanner in = new Scanner(System.in);
   
    while (true) {
      System.out.print(">");
      String input = in.nextLine();
      String[] args = input.split(" ");

      if (input.equals("play"))
        sound.play();
      else if (input.equals("stop"))
        sound.stop();
      else if (input.equals("loop"))
        sound.loop();
      else if (input.equals("pause"))
        sound.pause();
      else if (input.equals("resume"))
        sound.resume();
      else if (input.equals("close"))
        sound.close();
      else if (input.startsWith("loop"))
        sound.loop(Integer.parseInt(args[1]));
      else if (input.startsWith("volume"))
        sound.setVolume(Float.parseFloat(args[1]));
      else if (input.equals("getpath"))
        System.out.println(sound.getPath());
      else if (input.equals("isstopped"))
        System.out.println(sound.isStopped());
      else if (input.equals("isPaused"))
        System.out.println(sound.isPaused());
      else
        System.out.println("No command found");
    }
  }
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.