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 3 of 3

Thread: Java refuses to play sound on my machine

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java refuses to play sound on my machine

    Sorry if I'm posting this in the wrong forum, I couldn't quite figure out which forum is suitable.

    I've previously written several apps that included sound, and they all worked well.
    Recently I've been working on a new game and encountered some errors trying to play sounds - All functions related to sound don't seem to work.
    The problem occurs with all sound files (wav's), and also when using JLayer with mp3 files.

    I can't use any of the following methods: (getting different error messages, which I will specify in parenthesis).
    AudioSystem.getClip() ("No line matching interface Clip supporting format..")
    AudioSystem.getMixerInfo().length (oddly returns 0).
    AudioStream.getData() ("could not create AudioData object")
    AudioPlayer.player.start(InputStream i) (no error / exception but the sounds simply don't play).

    After getting all these exceptions in my new game I retried my previous games and apps and suddenly all of the sounds don't work - no sound whatsoever, Although they all worked perfectly at the time, and I've changed nothing in terms of hardware nor software.

    I should note that I am able to use Winamp and Windows Media Player so the sound hardware and drivers are fine.

    Can anyone offer assistance and/or explanations?
    Thanks in advance,
    Geva.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Java refuses to play sound on my machine

    Have the sound files moved/permissions changed?

    Take a look at Sun's tutorial for audio playback.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java refuses to play sound on my machine

    Quote Originally Posted by helloworld922 View Post
    Have the sound files moved/permissions changed?

    Take a look at Sun's tutorial for audio playback.
    Nope, the files haven't been moves and the permissions remained the same.

    I already went over Sun's tutorial and it doesn't mention any possible problems, not to mention my specific problem where it doesn't identify any mixer and doesn't play sound. The weirdest part is that it has already worked in the past..

Similar Threads

  1. Java error "could not create java virtual machine"
    By aubrey4444 in forum Java Theory & Questions
    Replies: 17
    Last Post: October 3rd, 2010, 12:51 PM
  2. Moving MySql Database from one machine to another machine
    By vaishali in forum JDBC & Databases
    Replies: 5
    Last Post: July 21st, 2010, 01:21 AM
  3. Replies: 2
    Last Post: January 8th, 2010, 08:22 AM
  4. Difference between Speech API and Sound API
    By zeeshanmirza in forum Java SE APIs
    Replies: 1
    Last Post: October 22nd, 2009, 12:22 AM