Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Game sound delaying

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Game sound delaying

    Class:pastebin.com/UTmuRCQ6

    I'm trying to delay a sound according to its set delay, however while the sound is being delayed every other sound is also being delayed with it.

    My attempt to delay is here:

                   if (delay > 0) {
                                    Thread.sleep(delay);
                            }

    - line 73


  2. #2
    Member
    Join Date
    Jul 2013
    Posts
    219
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default Re: Game sound delaying

    Hello.
    Your question is ambiguous. Please write more to explain the problem to others clearly.
    I am guessing you are trying to play multiple sounds. And there is delay associated with each sound. The sound should pause for its specific delay.
    If so then read further. Otherwise go back and post the question clearly again.
    You will need to create a new thread for every sound. Associate with that thread the sound clip and the delay.

    Syed.

Similar Threads

  1. sound recorder
    By Arvind6446 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 30th, 2013, 09:36 PM
  2. Replies: 0
    Last Post: January 12th, 2012, 02:54 PM
  3. Recording Sound
    By mulligan252 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: November 7th, 2011, 08:45 AM
  4. Adding sound to a game application
    By Shaybay92 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 13th, 2011, 07:56 AM
  5. need help with Timer and sound
    By amahara in forum AWT / Java Swing
    Replies: 4
    Last Post: February 18th, 2010, 11:22 AM