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: How to make .wav player in java

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    26
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default How to make .wav player in java

    I've been trying to research how to make a simple java .wav player, but I can't find anything useful. If there is a way to play the file if it's already in my project folder, then that would be greatly appreciated. I am just looking for some source code, tutorial, or anything that's easy to follow in order to make a .wav java player. Thanks!


  2. #2
    Member coderxx0's Avatar
    Join Date
    Feb 2013
    Location
    England, UK
    Posts
    61
    My Mood
    Cool
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Default Re: How to make .wav player in java

    Quote Originally Posted by beansnbacon View Post
    I've been trying to research how to make a simple java .wav player, but I can't find anything useful. If there is a way to play the file if it's already in my project folder, then that would be greatly appreciated. I am just looking for some source code, tutorial, or anything that's easy to follow in order to make a .wav java player. Thanks!
    is this even possible i have never seen one in java

  3. #3
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Location
    Wales, Bangor & England, Warwickshire
    Posts
    820
    My Mood
    Cynical
    Thanks
    7
    Thanked 104 Times in 90 Posts

    Default Re: How to make .wav player in java

    Hi beansnbacon,

    yes this is possible take a look at the following links:

    AudioInputStream (Java Platform SE 6)
    AudioSystem (Java Platform SE 6)
    Clip (Java Platform SE 6)

    If you are interested in files other than .wav perhaps these will be of interest to you also (JavaFX):

    Incorporating Media Assets Into JavaFX Applications: Introduction to JavaFX Media | JavaFX 2 Tutorials and Documentation

    Regards,

    Chris
    chris[at]javaprogrammingforums[dot]com

    Prifysgol Bangor University, North Wales

Similar Threads

  1. Replies: 1
    Last Post: April 12th, 2013, 10:25 AM
  2. [SOLVED] is there any good formula's for 2d java game - to make ur player move right or left?
    By hwoarang69 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 23rd, 2012, 01:42 AM
  3. How can i make my Player attack another Player?
    By Graser in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 31st, 2012, 05:01 PM
  4. java game bullets hit player 1 but not player 2
    By ajakking789 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 22nd, 2011, 08:19 AM
  5. java game, both players move for player 2 but not player 1
    By ajakking789 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 21st, 2011, 12:52 PM

Tags for this Thread