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: Reading Every sample of a Wave audio file Using Java

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Reading Every sample of a Wave audio file Using Java

    Hello All,

    I am trying to read one by one all the sample of a wave file in Java. I am working with eclipse.

    I have created simple that does not work. I am seeing the following error.

    Error
    ================================================== ============
    Description Resource Path Location Type
    WavFile cannot be resolved to a type ReadSample.java /ReadExample/src line 13 Java Problem
    ================================================== ===========

    Please see my code below
    ============================================
    import sun.audio.*;
    import java.io.*;

    public class ReadSample
    {

    public static void main(String[] args)
    {
    // TODO Auto-generated method stub
    try
    {
    // Open the wave file specified as the first argument
    WavFile wavFile = WavFile.openWaveFile (new File("C:/Download/Wave_Files/ymch1x16.wav"));

    // Display information about the wav file
    wavFile.display();
    }
    catch (Exception e)
    {
    System.err.println(e) ;
    }

    }

    }



    ====================================

    Many thanks for your help.

    Cserge


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Reading Every sample of a Wave audio file Using Java

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Please post your code correctly as described in the above link.

Similar Threads

  1. UnsupportedAudioFileException opening a 3 or more channels wave file
    By Revenge in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: November 25th, 2013, 12:10 PM
  2. [SOLVED] Need an sample on ProcessBuilder to delete a file.
    By Andrew R in forum What's Wrong With My Code?
    Replies: 6
    Last Post: August 26th, 2013, 10:55 AM
  3. Reading a file and comparing them to an array to get the file type - java
    By tomb1992 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: March 4th, 2013, 06:13 PM
  4. Audio File Metadata Extraction in java
    By madhura.yerawar in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: January 21st, 2012, 01:16 AM
  5. Reading Audio file
    By madhura.yerawar in forum Java Theory & Questions
    Replies: 0
    Last Post: January 21st, 2012, 01:05 AM