Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:57:28+00:00 2026-05-31T02:57:28+00:00

When I try to play two sounds at once in an applet, it won’t

  • 0

When I try to play two sounds at once in an applet, it won’t work. I’m using AudioClips. Is it even possible to play two sounds at once in an applet?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:57:30+00:00Added an answer on May 31, 2026 at 2:57 am

    Since Java 1.3+, use the Clip class of the Java Sound API. It is similar to the applet based AudioClip class, but better.

    E.G. adapted from the one shown on the Java Sound info. page.

    import java.net.URL;
    import javax.swing.*;
    import javax.sound.sampled.*;
    
    public class LoopSounds {
    
        public static void main(String[] args) throws Exception {
            URL url = new URL(
                "http://pscode.org/media/leftright.wav");
            Clip clip = AudioSystem.getClip();
            AudioInputStream ais = AudioSystem.
                getAudioInputStream( url );
            clip.open(ais);
    
            URL url2 = new URL(
                "http://pscode.org/media/100_2817-linear.wav");
            Clip clip2 = AudioSystem.getClip();
            AudioInputStream ais2 = AudioSystem.
                getAudioInputStream( url2 );
            clip2.open(ais2);
    
            // loop continuously
            clip.loop(Clip.LOOP_CONTINUOUSLY);
            clip2.loop(Clip.LOOP_CONTINUOUSLY);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    // A GUI element to prevent the Clip's daemon Thread
                    // from terminating at the end of the main()
                    JOptionPane.showMessageDialog(null, "Close to exit!");
                }
            });
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to restrict (using deadbolt ) something in my view ( play! framework
I downloaded play-2.0.zip from the website. When I try to unzip it (using 7-zip),
I am implementing an application in which I play two sounds ( touchandshow followed
I want to play two sounds, but the last one only after the first
so i am using the play framework and I'm try to create multiple submit
I installed the BlackBerryPlayBookSimulator-Installer-1.0.8-6067-Win-201112052354 On windows7 and try to play on the VMWare player
I try open and play .wav files with NAudio lib. private OpenFileDialog openFileDialog =
I try to establish a build pipeline on Jenkins with a Play(2.0.2) project. As
i try to off a sound effect on my app play method is '
I want to try out Joda Time with Play Framework 2.0. So I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.